Skip to content

Commit

Permalink
[JENKINS-21984] Disabling cert check on updateDirectlyWithJson since …
Browse files Browse the repository at this point in the history
…the certificate is now expired, and it is no good to have a test which is known to start failing at a particular time in the future!
  • Loading branch information
jglick committed Feb 28, 2014
1 parent c87b7da commit 334ce1b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/src/test/java/hudson/model/UpdateSiteTest.java
Expand Up @@ -47,7 +47,6 @@
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.RandomlyFails;
import org.mortbay.jetty.HttpConnection;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.bio.SocketConnector;
Expand Down Expand Up @@ -122,19 +121,17 @@ public void shutdownWebserver() throws Exception {
assertEquals("Wrong name of plugin found", "Task Scanner Plug-in", tasksPlugin.getDisplayName());
}

@RandomlyFails("CertificateExpiredException: NotAfter: …")
@Test public void updateDirectlyWithJson() throws Exception {
UpdateSite us = new UpdateSite("default", new URL(baseUrl, "update-center.json").toExternalForm());
assertNull(us.getPlugin("AdaptivePlugin"));
assertEquals(FormValidation.ok(), us.updateDirectly(true).get());
assertEquals(FormValidation.ok(), us.updateDirectly(/* TODO the certificate is now expired, and downloading a fresh copy did not seem to help */false).get());
assertNotNull(us.getPlugin("AdaptivePlugin"));
}

@RandomlyFails("CertificateExpiredException: NotAfter: …")
@Test public void updateDirectlyWithHtml() throws Exception {
UpdateSite us = new UpdateSite("default", new URL(baseUrl, "update-center.json.html").toExternalForm());
assertNull(us.getPlugin("AdaptivePlugin"));
assertEquals(FormValidation.ok(), us.updateDirectly(true).get());
assertEquals(FormValidation.ok(), us.updateDirectly(false).get());
assertNotNull(us.getPlugin("AdaptivePlugin"));
}
}

0 comments on commit 334ce1b

Please sign in to comment.