Skip to content

Commit 599f9b7

Browse files
author
libertyzhu
committed
fix ut: post_bucket_inverory
1 parent 26524da commit 599f9b7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

ut/test.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,11 +1894,16 @@ def test_post_bucket_inventory_configurations():
18941894
Bucket=test_bucket,
18951895
Id=inventory_id,
18961896
)
1897-
response = client.post_bucket_inventory(
1898-
Bucket=test_bucket,
1899-
Id=inventory_id,
1900-
InventoryConfiguration=inventory_config,
1901-
)
1897+
time.sleep(3)
1898+
try:
1899+
response = client.post_bucket_inventory(
1900+
Bucket=test_bucket,
1901+
Id=inventory_id,
1902+
InventoryConfiguration=inventory_config,
1903+
)
1904+
except CosServiceError as e:
1905+
if e.get_error_code() == 'DuplicateInventoryId':
1906+
pass
19021907

19031908

19041909
def test_put_get_delete_bucket_tagging():

0 commit comments

Comments
 (0)