From a48cf75391ace28d98380008d7c4bb79e30e0d98 Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Tue, 8 Oct 2019 15:21:20 +0200 Subject: [PATCH] use empty bodies for canned acl tests with BlockPublicAccess This should be a temporary workaround until #42208 is fixed Signed-off-by: Abhishek Lekshmanan (cherry picked from commit d02c1819f67011d6869b86d4497cf6c31fc7be5c) --- s3tests_boto3/functional/test_s3.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/s3tests_boto3/functional/test_s3.py b/s3tests_boto3/functional/test_s3.py index 5414726..fef2fa5 100644 --- a/s3tests_boto3/functional/test_s3.py +++ b/s3tests_boto3/functional/test_s3.py @@ -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) + +