Skip to content

Commit

Permalink
Fixed review comments on ceph#453
Browse files Browse the repository at this point in the history
Signed-off-by: Ravindra Choudhari <ravindra.choudhari@seagate.com>
  • Loading branch information
Ravindra Choudhari committed Jun 3, 2022
1 parent 42b5d2e commit 3b4217b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions s3tests_boto3/functional/test_iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,16 +630,15 @@ def test_deny_object_actions_in_user_policy():
client.put_user_policy(PolicyDocument=policy_document_deny, PolicyName='DenyAccessPolicy',
UserName=get_tenant_user_id())

obj_key = 'foo'
e = assert_raises(ClientError, s3_client_tenant.put_object, Bucket=bucket, Key='foo')
status, error_code = _get_status_and_error_code(e.response)
eq(status, 403)
eq(error_code, 'AccessDenied')
e = assert_raises(ClientError, s3_client_tenant.get_object, Bucket=bucket, Key=obj_key)
e = assert_raises(ClientError, s3_client_tenant.get_object, Bucket=bucket, Key='foo')
status, error_code = _get_status_and_error_code(e.response)
eq(status, 403)
eq(error_code, 'AccessDenied')
e = assert_raises(ClientError, s3_client_tenant.delete_object, Bucket=bucket, Key=obj_key)
e = assert_raises(ClientError, s3_client_tenant.delete_object, Bucket=bucket, Key='foo')
status, error_code = _get_status_and_error_code(e.response)
eq(status, 403)
eq(error_code, 'AccessDenied')
Expand Down

0 comments on commit 3b4217b

Please sign in to comment.