mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 21:12:15 +00:00
Merge branch 'rc'
This commit is contained in:
commit
f024fb0fa6
1 file changed
+14
-2
@@ -34,10 +34,22 @@ public class DownloadServiceTest extends HudsonTestCase {
|
||||
|
||||
@Bug(5536)
|
||||
public void testPost() throws Exception {
|
||||
// initially it should fail because the data doesn't have a signature
|
||||
assertNull(job.getData());
|
||||
createWebClient().goTo("/self/testPost");
|
||||
JSONObject d = job.getData();
|
||||
assertEquals(hashCode(),d.getInt("hello"));
|
||||
assertNull(job.getData());
|
||||
|
||||
// and now it should work
|
||||
DownloadService.signatureCheck = false;
|
||||
try {
|
||||
createWebClient().goTo("/self/testPost");
|
||||
JSONObject d = job.getData();
|
||||
assertEquals(hashCode(),d.getInt("hello"));
|
||||
} finally {
|
||||
DownloadService.signatureCheck = true;
|
||||
}
|
||||
|
||||
// TODO: test with a signature
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user