Skip to content

Commit 402640d

Browse files
authored
Use Matrix Project Plugin in Security914Test, not Credentials Plugin (#26090)
Fixes #26088 The user interface update to the Credentials plugin in pull request: * jenkinsci/credentials-plugin#990 removed the image that this test used for its initial configuration. The change was released in Credentials plugin: * https://github.com/jenkinsci/credentials-plugin/releases/tag/1460.v48765a_c7d849 The new release of the Credentials plugin was included in Jenkins core with pull request: * #26046 This change switches from the Credentials plugin to the Matrix Project plugin as the base for the test. The assumption is that user interface changes are less likely to the Matrix Project plugin. Testing done: * Confirmed that the tests fail on Windows without this change * Confirmed that the tests pass on Windows with this change
1 parent 96f17d5 commit 402640d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/src/test/java/jenkins/security/stapler/Security914Test.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ void setUp(JenkinsRule rule) {
5555
void cannotUseInvalidLocale_toTraverseFolder() throws Exception {
5656
assumeTrue(Functions.isWindows());
5757

58-
assertNotNull(j.getPluginManager().getPlugin("credentials"));
59-
j.createWebClient().goTo("plugin/credentials/images/credentials.svg", "image/svg+xml");
58+
assertNotNull(j.getPluginManager().getPlugin("matrix-project"));
59+
j.createWebClient().goTo("plugin/matrix-project/images/matrixproject.svg", "image/svg+xml");
6060

6161
JenkinsRule.WebClient wc = j.createWebClient()
6262
.withThrowExceptionOnFailingStatusCode(false);
63-
WebRequest request = new WebRequest(new URI(j.getURL() + "plugin/credentials/.xml").toURL());
63+
WebRequest request = new WebRequest(new URI(j.getURL() + "plugin/matrix-project/.xml").toURL());
6464
// plugin deployed in: test\target\jenkins7375296945862059919tmp
6565
// rootDir is in : test\target\jenkinsTests.tmp\jenkins1274934531848159942test
6666
// j.jenkins.getRootDir().getName() = jenkins1274934531848159942test
@@ -75,12 +75,12 @@ void cannotUseInvalidLocale_toTraverseFolder() throws Exception {
7575
void cannotUseInvalidLocale_toAnyFileInSystem() throws Exception {
7676
assumeTrue(Functions.isWindows());
7777

78-
assertNotNull(j.getPluginManager().getPlugin("credentials"));
79-
j.createWebClient().goTo("plugin/credentials/images/credentials.svg", "image/svg+xml");
78+
assertNotNull(j.getPluginManager().getPlugin("matrix-project"));
79+
j.createWebClient().goTo("plugin/matrix-project/images/matrixproject.svg", "image/svg+xml");
8080

8181
JenkinsRule.WebClient wc = j.createWebClient()
8282
.withThrowExceptionOnFailingStatusCode(false);
83-
WebRequest request = new WebRequest(new URI(j.getURL() + "plugin/credentials/.ini").toURL());
83+
WebRequest request = new WebRequest(new URI(j.getURL() + "plugin/matrix-project/.ini").toURL());
8484
// ../ can be multiply to infinity, no impact, we just need to have enough to reach the root
8585
request.setAdditionalHeader("Accept-Language", "../../../../../../../../../../../../windows/win");
8686

0 commit comments

Comments
 (0)