mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 23:42:42 +00:00
Simplify test and output problematic bucket name on failure.
This commit is contained in:
parent
53596480f2
commit
35e2b3dec5
1 changed files with 3 additions and 2 deletions
|
@ -788,9 +788,10 @@ def test_object_giveaway():
|
||||||
def test_buckets_create_then_list():
|
def test_buckets_create_then_list():
|
||||||
create_buckets = [get_new_bucket() for i in xrange(5)]
|
create_buckets = [get_new_bucket() for i in xrange(5)]
|
||||||
list_buckets = s3.main.get_all_buckets()
|
list_buckets = s3.main.get_all_buckets()
|
||||||
|
names = frozenset(bucket.name for bucket in list_buckets)
|
||||||
for bucket in create_buckets:
|
for bucket in create_buckets:
|
||||||
if not len([f for f in list_buckets if f.name == bucket.name]):
|
if bucket.name not in names:
|
||||||
raise RuntimeError("S3 implementation's GET on Service did not return bucket we created")
|
raise RuntimeError("S3 implementation's GET on Service did not return bucket we created: %r", bucket.name)
|
||||||
|
|
||||||
# Common code to create a connection object, which'll use bad authorization information
|
# Common code to create a connection object, which'll use bad authorization information
|
||||||
def _create_connection_bad_auth():
|
def _create_connection_bad_auth():
|
||||||
|
|
Loading…
Reference in a new issue