mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-21 23:29:47 +00:00
test bucket recreation with different acls
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit f6218fa1de
)
This commit is contained in:
parent
0e36699571
commit
65b067486e
1 changed files with 28 additions and 0 deletions
|
@ -4336,6 +4336,34 @@ def test_bucket_create_exists_nonowner():
|
||||||
eq(status, 409)
|
eq(status, 409)
|
||||||
eq(error_code, 'BucketAlreadyExists')
|
eq(error_code, 'BucketAlreadyExists')
|
||||||
|
|
||||||
|
@attr(resource='bucket')
|
||||||
|
@attr(method='put')
|
||||||
|
@attr(operation='re-create with existing acl')
|
||||||
|
@attr(assertion='fails 409')
|
||||||
|
def test_bucket_recreate_overwrite_acl():
|
||||||
|
bucket_name = get_new_bucket_name()
|
||||||
|
client = get_client()
|
||||||
|
|
||||||
|
client.create_bucket(Bucket=bucket_name, ACL='public-read')
|
||||||
|
e = assert_raises(ClientError, client.create_bucket, Bucket=bucket_name)
|
||||||
|
status, error_code = _get_status_and_error_code(e.response)
|
||||||
|
eq(status, 409)
|
||||||
|
eq(error_code, 'BucketAlreadyExists')
|
||||||
|
|
||||||
|
@attr(resource='bucket')
|
||||||
|
@attr(method='put')
|
||||||
|
@attr(operation='re-create with new acl')
|
||||||
|
@attr(assertion='fails 409')
|
||||||
|
def test_bucket_recreate_new_acl():
|
||||||
|
bucket_name = get_new_bucket_name()
|
||||||
|
client = get_client()
|
||||||
|
|
||||||
|
client.create_bucket(Bucket=bucket_name)
|
||||||
|
e = assert_raises(ClientError, client.create_bucket, Bucket=bucket_name, ACL='public-read')
|
||||||
|
status, error_code = _get_status_and_error_code(e.response)
|
||||||
|
eq(status, 409)
|
||||||
|
eq(error_code, 'BucketAlreadyExists')
|
||||||
|
|
||||||
def check_access_denied(fn, *args, **kwargs):
|
def check_access_denied(fn, *args, **kwargs):
|
||||||
e = assert_raises(ClientError, fn, *args, **kwargs)
|
e = assert_raises(ClientError, fn, *args, **kwargs)
|
||||||
status = _get_status(e.response)
|
status = _get_status(e.response)
|
||||||
|
|
Loading…
Reference in a new issue