Skip to content

Commit

Permalink
Bump instance-identity from 3.1 to 116.vf8f487400980 (jenkinsci#6715)
Browse files Browse the repository at this point in the history
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and jtnord authored Jul 6, 2022
1 parent e01c1ba commit 2b83c2e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
9 changes: 8 additions & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>instance-identity</artifactId>
<version>3.1</version>
<version>116.vf8f487400980</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -205,6 +205,13 @@ THE SOFTWARE.
<!-- Version specified in grandparent POM -->
<extensions>true</extensions>
<executions>
<execution>
<id>prepare-test-plugins</id>
<goals>
<goal>resolve-test-dependencies</goal>
</goals>
<phase>test-compile</phase>
</execution>
<execution>
<id>test-runtime</id>
<goals>
Expand Down
7 changes: 3 additions & 4 deletions test/src/test/java/hudson/PluginTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,15 @@
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.TestPluginManager;

public class PluginTest {

@Rule public JenkinsRule r = new JenkinsRule();

@Issue({"SECURITY-131", "SECURITY-155", "SECURITY-705"})
@Test public void doDynamic() throws Exception {
((TestPluginManager) r.jenkins.pluginManager).installDetachedPlugin("matrix-auth");
r.createWebClient().goTo("plugin/matrix-auth/images/user-disabled.png", "image/png");
r.createWebClient().goTo("plugin/matrix-auth/images/../images/user-disabled.png", "image/png"); // collapsed somewhere before it winds up in restOfPath
r.createWebClient().goTo("plugin/matrix-auth/images/select-all.svg", "image/svg+xml");
r.createWebClient().goTo("plugin/matrix-auth/images/../images/select-all.svg", "image/svg+xml"); // collapsed somewhere before it winds up in restOfPath
/* TODO https://github.com/apache/httpcomponents-client/commit/8c04c6ae5e5ba1432e40684428338ce68431766b#r32873542
r.createWebClient().assertFails("plugin/matrix-auth/images/%2E%2E/images/user-disabled.png", HttpServletResponse.SC_INTERNAL_SERVER_ERROR); // IAE from TokenList.<init>
r.createWebClient().assertFails("plugin/matrix-auth/images/%252E%252E/images/user-disabled.png", HttpServletResponse.SC_BAD_REQUEST); // SECURITY-131
Expand Down Expand Up @@ -77,4 +75,5 @@ public void preventTimestamp2_toBeServed() throws Exception {
}
r.createWebClient().assertFails("plugin/matrix-auth/.timestamp2", HttpServletResponse.SC_BAD_REQUEST);
}

}
2 changes: 1 addition & 1 deletion test/src/test/java/hudson/cli/ListPluginsCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void listPluginsExpectedUsage() {
CLICommandInvoker.Result result = new CLICommandInvoker(j, new ListPluginsCommand())
.invoke();
assertThat(result, CLICommandInvoker.Matcher.succeeded());
assertThat(result, CLICommandInvoker.Matcher.hasNoStandardOutput());
assertThat(result, not(CLICommandInvoker.Matcher.hasNoStandardOutput()));
assertThat(result.stdout(), not(containsString("token-macro")));

assertThat(new CLICommandInvoker(j, new InstallPluginCommand()).
Expand Down
3 changes: 0 additions & 3 deletions test/src/test/java/hudson/model/UsageStatisticsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.TestPluginManager;

/**
* @author Kohsuke Kawaguchi
Expand All @@ -74,8 +73,6 @@ public class UsageStatisticsTest {
*/
@Test
public void roundtrip() throws Exception {
((TestPluginManager) j.jenkins.pluginManager).installDetachedPlugin("matrix-auth");

j.createOnlineSlave();
warmUpNodeMonitorCache();

Expand Down
2 changes: 0 additions & 2 deletions test/src/test/java/jenkins/I18nTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.TestPluginManager;
import org.xml.sax.SAXException;

/**
Expand Down Expand Up @@ -63,7 +62,6 @@ public void test_baseName_unknown() throws IOException, SAXException {
@Issue("JENKINS-35270")
@Test
public void test_baseName_plugin() throws Exception {
((TestPluginManager) jenkinsRule.jenkins.pluginManager).installDetachedPlugin("matrix-auth");
JSONObject response = jenkinsRule.getJSON("i18n/resourceBundle?baseName=org.jenkinsci.plugins.matrixauth.Messages").getJSONObject();
Assert.assertEquals(response.toString(), "ok", response.getString("status"));
JSONObject data = response.getJSONObject("data");
Expand Down

0 comments on commit 2b83c2e

Please sign in to comment.