mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-21 23:29:47 +00:00
fix nuke_buckets for non-region tests
Signed-off-by: Joe Buck <jbbuck@gmail.com>
This commit is contained in:
parent
2a216abcb4
commit
ad9f3615e3
1 changed files with 20 additions and 16 deletions
|
@ -77,9 +77,14 @@ def nuke_prefixed_buckets_on_conn(prefix, name, conn):
|
|||
pass
|
||||
|
||||
def nuke_prefixed_buckets(prefix):
|
||||
# If no regions are specified, use the simple method
|
||||
if targets.main.master == None:
|
||||
for name, conn in s3.items():
|
||||
print 'Deleting buckets on {name}'.format(name=name)
|
||||
nuke_prefixed_buckets_on_conn(prefix, name, conn)
|
||||
else:
|
||||
# First, delete all buckets on the master connection
|
||||
for name, conn in s3.items():
|
||||
#if conn == s3[targets.main.master]:
|
||||
if conn == targets.main.master.connection:
|
||||
print 'Deleting buckets on {name} (master)'.format(name=name)
|
||||
nuke_prefixed_buckets_on_conn(prefix, name, conn)
|
||||
|
@ -90,7 +95,6 @@ def nuke_prefixed_buckets(prefix):
|
|||
|
||||
# Now delete remaining buckets on any other connection
|
||||
for name, conn in s3.items():
|
||||
#if conn != s3[targets.main.master]:
|
||||
if conn != targets.main.master.connection:
|
||||
print 'Deleting buckets on {name} (non-master)'.format(name=name)
|
||||
nuke_prefixed_buckets_on_conn(prefix, name, conn)
|
||||
|
|
Loading…
Reference in a new issue