Skip to content
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

Bump instance-identity from 3.1 to 116.vf8f487400980 #6715

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>generate-test-resources</phase>
</execution>
jtnord marked this conversation as resolved.
Show resolved Hide resolved
<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");
Copy link
Member

Choose a reason for hiding this comment

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

(implicitly assumes that matrix-auth is loaded)

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