Skip to content

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

Merged
basil merged 1 commit into
jenkinsci:masterfrom
basil:jetty
Mar 29, 2025
Merged

basil merged 1 commit into
jenkinsci:masterfrom
basil:jetty

Conversation

@basil

@basil basil commented Mar 26, 2025

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

@MarkEWaite MarkEWaite left a comment

Copy link
Copy Markdown
Contributor

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
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