]> git.apps.os.sepia.ceph.com Git - s3-tests.git/commitdiff
s3: remove test_bucket_acl_no_grants()
authorCasey Bodley <cbodley@redhat.com>
Fri, 1 Mar 2024 14:59:09 +0000 (09:59 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 16 Apr 2024 15:24:49 +0000 (11:24 -0400)
aws doesn't consult acls for same-account access. rgw doesn't for
account users either

Fixes: https://github.com/ceph/s3-tests/issues/184
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 96d658444ac1b70a28acb5d0e88460f89d71aa0a)

s3tests_boto3/functional/test_s3.py

index d5ab01a27293a4afc7cc6bad3d3cdc1a58d4fea1..728f97b6a214a27e983834ba3bb143dbc8780c40 100644 (file)
@@ -4674,40 +4674,6 @@ def test_bucket_acl_grant_nonexist_user():
     assert status == 400
     assert error_code == 'InvalidArgument'
 
-def test_bucket_acl_no_grants():
-    bucket_name = get_new_bucket()
-    client = get_client()
-
-    client.put_object(Bucket=bucket_name, Key='foo', Body='bar')
-    response = client.get_bucket_acl(Bucket=bucket_name)
-    old_grants = response['Grants']
-    policy = {}
-    policy['Owner'] = response['Owner']
-    # clear grants
-    policy['Grants'] = []
-
-    # remove read/write permission
-    response = client.put_bucket_acl(Bucket=bucket_name, AccessControlPolicy=policy)
-
-    # can read
-    client.get_object(Bucket=bucket_name, Key='foo')
-
-    # can't write
-    check_access_denied(client.put_object, Bucket=bucket_name, Key='baz', Body='a')
-
-    #TODO fix this test once a fix is in for same issues in
-    # test_access_bucket_private_object_private
-    client2 = get_client()
-    # owner can read acl
-    client2.get_bucket_acl(Bucket=bucket_name)
-
-    # owner can write acl
-    client2.put_bucket_acl(Bucket=bucket_name, ACL='private')
-
-    # set policy back to original so that bucket can be cleaned up
-    policy['Grants'] = old_grants
-    client2.put_bucket_acl(Bucket=bucket_name, AccessControlPolicy=policy)
-
 def _get_acl_header(user_id=None, perms=None):
     all_headers = ["read", "write", "read-acp", "write-acp", "full-control"]
     headers = []