From d4e9e40792b935f1d8695f849cb65775c94a80ec Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 28 Oct 2014 15:20:58 -0700 Subject: [PATCH] teardown: clean object versions also don't set acls on buckets, objects before removing, no need for that. Signed-off-by: Yehuda Sadeh --- s3tests/functional/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/s3tests/functional/__init__.py b/s3tests/functional/__init__.py index 51dd506..0b0561f 100644 --- a/s3tests/functional/__init__.py +++ b/s3tests/functional/__init__.py @@ -59,17 +59,19 @@ def nuke_prefixed_buckets_on_conn(prefix, name, conn): name=name, prefix=prefix, ) + for bucket in conn.get_all_buckets(): + print 'prefix=',prefix if bucket.name.startswith(prefix): print 'Cleaning bucket {bucket}'.format(bucket=bucket) try: - bucket.set_canned_acl('private') - for key in bucket.list(): + # bucket.set_canned_acl('private') + for key in bucket.list_versions(): print 'Cleaning bucket {bucket} key {key}'.format( bucket=bucket, key=key, ) - key.set_canned_acl('private') + # key.set_canned_acl('private') key.delete() bucket.delete() except boto.exception.S3ResponseError as e: