mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-22 09:29:43 +00:00
Merge pull request #30 from andrewgaul/bucket-create-exists
Handle idempotent and BucketAlreadyOwnedByYou Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
commit
2851e0c214
1 changed files with 8 additions and 3 deletions
|
@ -2990,11 +2990,16 @@ def test_bucket_create_naming_dns_dash_dot():
|
||||||
@attr(resource='bucket')
|
@attr(resource='bucket')
|
||||||
@attr(method='put')
|
@attr(method='put')
|
||||||
@attr(operation='re-create')
|
@attr(operation='re-create')
|
||||||
@attr(assertion='idempotent success')
|
|
||||||
def test_bucket_create_exists():
|
def test_bucket_create_exists():
|
||||||
|
# aws-s3 default region allows recreation of buckets
|
||||||
|
# but all other regions fail with BucketAlreadyOwnedByYou.
|
||||||
bucket = get_new_bucket(targets.main.default)
|
bucket = get_new_bucket(targets.main.default)
|
||||||
# REST idempotency means this should be a nop
|
try:
|
||||||
get_new_bucket(targets.main.default, bucket.name)
|
get_new_bucket(targets.main.default, bucket.name)
|
||||||
|
except boto.exception.S3CreateError, e:
|
||||||
|
eq(e.status, 409)
|
||||||
|
eq(e.reason, 'Conflict')
|
||||||
|
eq(e.error_code, 'BucketAlreadyOwnedByYou')
|
||||||
|
|
||||||
|
|
||||||
@attr(resource='bucket')
|
@attr(resource='bucket')
|
||||||
|
|
Loading…
Reference in a new issue