Skip to content

Convert tests to com.sun.net.httpserver #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2025
Merged

Conversation

basil
Copy link
Member

@basil basil commented Mar 26, 2025

Like jenkinsci/kubernetes-credentials-plugin#54. Makes these tests less fragile by eliminating reliance on a particular EE version (currently EE 9) in favor of more generic Java Platform functionality.

Testing done

mvn clean verify

@basil basil added the tests label Mar 26, 2025
@basil basil requested a review from MarkEWaite March 26, 2025 18:39
@basil basil requested a review from a team as a code owner March 26, 2025 18:39
String state = req.getParameter("state");
resp.sendRedirect(jenkinsRule.getURL() + "securityRealm/finishLogin?code=" + code + "&state=" + state);
Fields fields = new Fields();
UrlEncoded.decodeUtf8To(he.getRequestURI().getQuery(), fields);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use some copypasta like this instead to completely avoid Jetty here, but this seems more maintainable and I doubt this method will change in the future (it is not tied to EE version). No strong preference here.

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me. Thanks!

@basil basil merged commit 135e939 into jenkinsci:master Mar 29, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants