mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 13:47:27 +00:00
test_s3 should reset permissions prior to attempting delete
This commit is contained in:
parent
82693cea22
commit
3ee10d3dbe
1 changed files with 2 additions and 0 deletions
|
@ -62,11 +62,13 @@ def nuke_prefixed_buckets(prefix):
|
|||
if bucket.name.startswith(prefix):
|
||||
print 'Cleaning bucket {bucket}'.format(bucket=bucket)
|
||||
try:
|
||||
bucket.set_canned_acl('private')
|
||||
for key in bucket.list():
|
||||
print 'Cleaning bucket {bucket} key {key}'.format(
|
||||
bucket=bucket,
|
||||
key=key,
|
||||
)
|
||||
key.set_canned_acl('private')
|
||||
key.delete()
|
||||
bucket.delete()
|
||||
except boto.exception.S3ResponseError as e:
|
||||
|
|
Loading…
Reference in a new issue