提交 ed28a208 编写于 作者: K Kohsuke Kawaguchi

fixed a test regression

上级 383da152
...@@ -34,10 +34,22 @@ public class DownloadServiceTest extends HudsonTestCase { ...@@ -34,10 +34,22 @@ public class DownloadServiceTest extends HudsonTestCase {
@Bug(5536) @Bug(5536)
public void testPost() throws Exception { public void testPost() throws Exception {
// initially it should fail because the data doesn't have a signature
assertNull(job.getData()); assertNull(job.getData());
createWebClient().goTo("/self/testPost"); createWebClient().goTo("/self/testPost");
JSONObject d = job.getData(); assertNull(job.getData());
assertEquals(hashCode(),d.getInt("hello"));
// 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
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册