mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-29 03:41:48 +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):
|
if bucket.name.startswith(prefix):
|
||||||
print 'Cleaning bucket {bucket}'.format(bucket=bucket)
|
print 'Cleaning bucket {bucket}'.format(bucket=bucket)
|
||||||
try:
|
try:
|
||||||
|
bucket.set_canned_acl('private')
|
||||||
for key in bucket.list():
|
for key in bucket.list():
|
||||||
print 'Cleaning bucket {bucket} key {key}'.format(
|
print 'Cleaning bucket {bucket} key {key}'.format(
|
||||||
bucket=bucket,
|
bucket=bucket,
|
||||||
key=key,
|
key=key,
|
||||||
)
|
)
|
||||||
|
key.set_canned_acl('private')
|
||||||
key.delete()
|
key.delete()
|
||||||
bucket.delete()
|
bucket.delete()
|
||||||
except boto.exception.S3ResponseError as e:
|
except boto.exception.S3ResponseError as e:
|
||||||
|
|
Loading…
Reference in a new issue