Skip to content

Commit

Permalink
fix test: testBucketEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
sxci committed Mar 2, 2020
1 parent 85ca187 commit 4a367bb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/test/java/test/com/qiniu/storage/BucketTest2.java
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,13 @@ public void testBucketEvent() {
Assert.assertTrue(ResCode.find(e.code(), ResCode.getPossibleResCode(400)));
}

// 追加Event
rule.setName("b");
rule.setPrefix(key);
System.out.println(rule.asQueryString());
response = bucketManager.putBucketEvent(bucket, rule);
Assert.assertEquals(200, response.statusCode);

// 重复追加Event(error:event prefix and suffix exists)
try {
rule.setName("b");
Expand All @@ -680,13 +687,6 @@ public void testBucketEvent() {
Assert.assertTrue(ResCode.find(e.code(), ResCode.getPossibleResCode(400)));
}

// 追加Event
rule.setName("b");
rule.setPrefix(key);
System.out.println(rule.asQueryString());
response = bucketManager.putBucketEvent(bucket, rule);
Assert.assertEquals(200, response.statusCode);

// 触发时间,回调成功与否 不检测
response = bucketManager.copy(bucket, key, bucket, key + "CopyByEvent", true);
Assert.assertEquals(200, response.statusCode);
Expand Down

0 comments on commit 4a367bb

Please sign in to comment.