use empty bodies for canned acl tests with BlockPublicAccess
authorAbhishek Lekshmanan <abhishek@suse.com>
Tue, 8 Oct 2019 13:21:20 +0000 (15:21 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Wed, 22 Jan 2020 16:03:21 +0000 (17:03 +0100)
This should be a temporary workaround until #42208 is fixed

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
s3tests_boto3/functional/test_s3.py

index 54147266f377010a96a238ff7773282d38d19fd3..fef2fa59e91371d482ad122da4cf32feab9fb472 100644 (file)
@@ -12635,14 +12635,17 @@ def test_block_public_object_canned_acls():
     # eq(resp['PublicAccessBlockConfiguration']['BlockPublicAcls'], access_conf['BlockPublicAcls'])
     # eq(resp['PublicAccessBlockConfiguration']['BlockPublicPolicy'], access_conf['BlockPublicPolicy'])
 
-    e = assert_raises(ClientError, client.put_object, Bucket=bucket_name, Key='foo1', Body='bar', ACL='public-read')
+    #FIXME: use empty body until #42208
+    e = assert_raises(ClientError, client.put_object, Bucket=bucket_name, Key='foo1', Body='', ACL='public-read')
     status, error_code = _get_status_and_error_code(e.response)
     eq(status, 403)
 
-    e = assert_raises(ClientError, client.put_object, Bucket=bucket_name, Key='foo2', Body='bar', ACL='public-read')
+    e = assert_raises(ClientError, client.put_object, Bucket=bucket_name, Key='foo2', Body='', ACL='public-read')
     status, error_code = _get_status_and_error_code(e.response)
     eq(status, 403)
 
-    e = assert_raises(ClientError, client.put_object, Bucket=bucket_name, Key='foo3', Body='bar', ACL='authenticated-read')
+    e = assert_raises(ClientError, client.put_object, Bucket=bucket_name, Key='foo3', Body='', ACL='authenticated-read')
     status, error_code = _get_status_and_error_code(e.response)
     eq(status, 403)
+
+