From e523a8c21c6ae50a2b8701cd0621afe15d1dbdfe Mon Sep 17 00:00:00 2001 From: ProshNad Date: Tue, 3 Sep 2024 13:18:17 +0000 Subject: [PATCH] mark failed on aws tests part 1 --- s3tests_boto3/functional/test_headers.py | 12 ++++++ s3tests_boto3/functional/test_s3.py | 51 ++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 3 deletions(-) diff --git a/s3tests_boto3/functional/test_headers.py b/s3tests_boto3/functional/test_headers.py index 66cabe5..d23f644 100644 --- a/s3tests_boto3/functional/test_headers.py +++ b/s3tests_boto3/functional/test_headers.py @@ -219,6 +219,7 @@ def test_object_create_bad_contentlength_negative(): @pytest.mark.auth_common # TODO: remove 'fails_on_rgw' and once we have learned how to remove the content-length header @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_object_create_bad_contentlength_none(): remove = 'Content-Length' e = _remove_header_create_bad_object('Content-Length') @@ -251,6 +252,7 @@ def test_object_create_bad_contenttype_none(): @pytest.mark.auth_common # TODO: remove 'fails_on_rgw' and once we have learned how to remove the authorization header @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_object_create_bad_authorization_empty(): e = _add_header_create_bad_object({'Authorization': ''}) status, error_code = _get_status_and_error_code(e.response) @@ -259,6 +261,7 @@ def test_object_create_bad_authorization_empty(): @pytest.mark.auth_common # TODO: remove 'fails_on_rgw' and once we have learned how to pass both the 'Date' and 'X-Amz-Date' header during signing and not 'X-Amz-Date' before @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_object_create_date_and_amz_date(): date = formatdate(usegmt=True) bucket_name, key_name = _add_header_create_object({'Date': date, 'X-Amz-Date': date}) @@ -268,6 +271,7 @@ def test_object_create_date_and_amz_date(): @pytest.mark.auth_common # TODO: remove 'fails_on_rgw' and once we have learned how to pass both the 'Date' and 'X-Amz-Date' header during signing and not 'X-Amz-Date' before @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_object_create_amz_date_and_no_date(): date = formatdate(usegmt=True) bucket_name, key_name = _add_header_create_object({'Date': '', 'X-Amz-Date': date}) @@ -278,6 +282,7 @@ def test_object_create_amz_date_and_no_date(): @pytest.mark.auth_common # TODO: remove 'fails_on_rgw' and once we have learned how to remove the authorization header @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_object_create_bad_authorization_none(): e = _remove_header_create_bad_object('Authorization') status, error_code = _get_status_and_error_code(e.response) @@ -362,6 +367,7 @@ def test_bucket_create_bad_contentlength_none(): @pytest.mark.auth_common # TODO: remove 'fails_on_rgw' and once we have learned how to manipulate the authorization header @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_bucket_create_bad_authorization_empty(): headers = {'Authorization': ''} e = _add_header_create_bad_bucket(headers) @@ -372,6 +378,7 @@ def test_bucket_create_bad_authorization_empty(): @pytest.mark.auth_common # TODO: remove 'fails_on_rgw' and once we have learned how to manipulate the authorization header @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_bucket_create_bad_authorization_none(): e = _remove_header_create_bad_bucket('Authorization') status, error_code = _get_status_and_error_code(e.response) @@ -403,6 +410,7 @@ def test_object_create_bad_contentlength_mismatch_below_aws2(): @pytest.mark.auth_aws2 # TODO: remove 'fails_on_rgw' and once we have learned how to manipulate the authorization header @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_object_create_bad_authorization_incorrect_aws2(): v2_client = get_v2_client() headers = {'Authorization': 'AWS AKIAIGR7ZNNBHC5BKSUB:FWeDfwojDSdS2Ztmpfeubhd9isU='} @@ -414,6 +422,7 @@ def test_object_create_bad_authorization_incorrect_aws2(): @pytest.mark.auth_aws2 # TODO: remove 'fails_on_rgw' and once we have learned how to manipulate the authorization header @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_object_create_bad_authorization_invalid_aws2(): v2_client = get_v2_client() headers = {'Authorization': 'AWS HAHAHA'} @@ -457,6 +466,7 @@ def test_object_create_bad_date_empty_aws2(): @pytest.mark.auth_aws2 # TODO: remove 'fails_on_rgw' and once we have learned how to remove the date header @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_object_create_bad_date_none_aws2(): v2_client = get_v2_client() remove = 'x-amz-date' @@ -495,6 +505,7 @@ def test_object_create_bad_date_after_end_aws2(): @pytest.mark.auth_aws2 # TODO: remove 'fails_on_rgw' and once we have learned how to remove the date header @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_bucket_create_bad_authorization_invalid_aws2(): v2_client = get_v2_client() headers = {'Authorization': 'AWS HAHAHA'} @@ -536,6 +547,7 @@ def test_bucket_create_bad_date_empty_aws2(): @pytest.mark.auth_aws2 # TODO: remove 'fails_on_rgw' and once we have learned how to remove the date header @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_bucket_create_bad_date_none_aws2(): v2_client = get_v2_client() remove = 'x-amz-date' diff --git a/s3tests_boto3/functional/test_s3.py b/s3tests_boto3/functional/test_s3.py index b73a18b..fe23226 100644 --- a/s3tests_boto3/functional/test_s3.py +++ b/s3tests_boto3/functional/test_s3.py @@ -814,6 +814,8 @@ def test_bucket_listv2_prefix_not_exist(): assert keys == [] assert prefixes == [] +@pytest.mark.fails_on_aws +# AssertionError: assert '%0A' == '\n' on aws def test_bucket_list_prefix_unreadable(): key_names = ['foo/bar', 'foo/baz', 'quux'] bucket_name = _create_objects(keys=key_names) @@ -1844,6 +1846,7 @@ def test_object_set_get_metadata_overwrite_to_empty(): # TODO: the decoding of this unicode metadata is not happening properly for unknown reasons @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_object_set_get_unicode_metadata(): bucket_name = get_new_bucket() client = get_client() @@ -3094,6 +3097,8 @@ def test_put_object_ifmatch_good(): assert body == 'zar' @pytest.mark.fails_on_dbstore +@pytest.mark.fails_on_aws +# 501 error on aws def test_put_object_ifmatch_failed(): bucket_name = get_new_bucket() client = get_client() @@ -3473,6 +3478,7 @@ def test_object_raw_get_x_amz_expires_out_range_zero(): res = requests.get(url, verify=get_config_ssl_verify()).__dict__ assert res['status_code'] == 403 +@pytest.mark.fails_on_aws def test_object_raw_get_x_amz_expires_out_max_range(): bucket_name = _setup_bucket_object_acl('public-read', 'public-read') client = get_client() @@ -3483,6 +3489,7 @@ def test_object_raw_get_x_amz_expires_out_max_range(): res = requests.get(url, verify=get_config_ssl_verify()).__dict__ assert res['status_code'] == 403 +@pytest.mark.fails_on_aws def test_object_raw_get_x_amz_expires_out_positive_range(): bucket_name = _setup_bucket_object_acl('public-read', 'public-read') client = get_client() @@ -3554,6 +3561,7 @@ def test_object_presigned_put_object_with_acl_tenant(): _test_object_presigned_put_object_with_acl( client=get_tenant_client()) +@pytest.mark.fails_on_aws def test_object_raw_put_authenticated_expired(): bucket_name = get_new_bucket() client = get_client() @@ -3915,6 +3923,8 @@ def test_bucket_acl_canned_during_create(): ], ) +@pytest.mark.fails_on_aws +# response structure is different from expected def test_bucket_acl_canned(): bucket_name = get_new_bucket_name() client = get_client() @@ -3965,6 +3975,8 @@ def test_bucket_acl_canned(): ], ) +@pytest.mark.fails_on_aws +# response structure is different from expected def test_bucket_acl_canned_publicreadwrite(): bucket_name = get_new_bucket_name() client = get_client() @@ -4004,6 +4016,8 @@ def test_bucket_acl_canned_publicreadwrite(): ], ) +@pytest.mark.fails_on_aws +# response structure is different from expected def test_bucket_acl_canned_authenticatedread(): bucket_name = get_new_bucket_name() client = get_client() @@ -4062,6 +4076,7 @@ def test_object_acl_default(): ], ) +@pytest.mark.fails_on_aws def test_object_acl_canned_during_create(): bucket_name = get_new_bucket() client = get_client() @@ -4096,6 +4111,7 @@ def test_object_acl_canned_during_create(): ], ) +@pytest.mark.fails_on_aws def test_object_acl_canned(): bucket_name = get_new_bucket() client = get_client() @@ -4149,6 +4165,7 @@ def test_object_acl_canned(): ], ) +@pytest.mark.fails_on_aws def test_object_acl_canned_publicreadwrite(): bucket_name = get_new_bucket() client = get_client() @@ -4190,6 +4207,7 @@ def test_object_acl_canned_publicreadwrite(): ], ) +@pytest.mark.fails_on_aws def test_object_acl_canned_authenticatedread(): bucket_name = get_new_bucket() client = get_client() @@ -4223,6 +4241,7 @@ def test_object_acl_canned_authenticatedread(): ], ) +@pytest.mark.fails_on_aws def test_object_acl_canned_bucketownerread(): bucket_name = get_new_bucket_name() main_client = get_client() @@ -4265,6 +4284,7 @@ def test_object_acl_canned_bucketownerread(): ], ) +@pytest.mark.fails_on_aws def test_object_acl_canned_bucketownerfullcontrol(): bucket_name = get_new_bucket_name() main_client = get_client() @@ -4931,6 +4951,8 @@ def test_bucket_acl_revoke_all(): # TODO rgw log_bucket.set_as_logging_target() gives 403 Forbidden # http://tracker.newdream.net/issues/984 @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws +# MalformedXML on aws def test_logging_toggle(): bucket_name = get_new_bucket() client = get_client() @@ -5806,6 +5828,8 @@ def test_object_copy_versioning_multipart_upload(): assert key1_metadata == response['Metadata'] assert content_type == response['ContentType'] +@pytest.mark.fails_on_aws +# InvalidRequest error on aws def test_multipart_upload_empty(): bucket_name = get_new_bucket() client = get_client() @@ -6418,6 +6442,7 @@ def test_multipart_upload_incorrect_etag(): assert error_code == 'InvalidPart' @pytest.mark.fails_on_dbstore +@pytest.mark.fails_on_aws def test_multipart_get_part(): bucket_name = get_new_bucket() client = get_client() @@ -6501,6 +6526,7 @@ def test_multipart_single_get_part(): assert status == 400 assert error_code == 'InvalidPart' +@pytest.mark.fails_on_aws @pytest.mark.fails_on_dbstore def test_non_multipart_get_part(): bucket_name = get_new_bucket() @@ -7174,6 +7200,8 @@ class ActionOnCount: if self.count == self.trigger_count: self.result = self.action() +@pytest.mark.fails_on_aws +# InvalidPartOrder on aws def test_multipart_resend_first_finishes_last(): bucket_name = get_new_bucket() client = get_client() @@ -7871,6 +7899,8 @@ def test_versioning_multi_object_delete_with_marker_create(): assert delete_marker_version_id == delete_markers[0]['VersionId'] assert key == delete_markers[0]['Key'] +@pytest.mark.fails_on_aws +# response structure is different from expected def test_versioned_object_acl(): bucket_name = get_new_bucket() client = get_client() @@ -7938,6 +7968,8 @@ def test_versioned_object_acl(): grants = response['Grants'] check_grants(grants, default_policy) +@pytest.mark.fails_on_aws +# response structure is different from expected @pytest.mark.fails_on_dbstore def test_versioned_object_acl_no_version_specified(): bucket_name = get_new_bucket() @@ -10845,6 +10877,8 @@ def test_put_max_tags(): assert response['TagSet'] == input_tagset['TagSet'] @pytest.mark.tagging +@pytest.mark.fails_on_aws +# BadRequest error on aws def test_put_excess_tags(): key = 'testputmaxtags' bucket_name = _create_key_with_random_content(key) @@ -11607,6 +11641,7 @@ def test_bucket_policy_put_obj_acl(): @pytest.mark.bucket_policy +@pytest.mark.fails_on_aws def test_bucket_policy_put_obj_grant(): bucket_name = get_new_bucket() @@ -11961,6 +11996,7 @@ def test_bucket_policy_put_obj_kms_s3(): @pytest.mark.bucket_policy # TODO: remove this fails_on_rgw when I fix it @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_bucket_policy_put_obj_request_obj_tag(): bucket_name = get_new_bucket() client = get_client() @@ -12812,8 +12848,9 @@ def test_copy_object_ifnonematch_failed(): body = _get_body(response) assert body == 'bar' -# TODO: results in a 404 instead of 400 on the RGW +# TODO: results in a 404 instead of 400 on the RGW and AWS @pytest.mark.fails_on_rgw +@pytest.mark.fails_on_aws def test_object_read_unreadable(): bucket_name = get_new_bucket() client = get_client() @@ -12822,12 +12859,15 @@ def test_object_read_unreadable(): assert status == 400 assert e.response['Error']['Message'] == 'Couldn\'t parse the specified URI.' +@pytest.mark.fails_on_aws def test_get_bucket_policy_status(): bucket_name = get_new_bucket() client = get_client() resp = client.get_bucket_policy_status(Bucket=bucket_name) assert resp['PolicyStatus']['IsPublic'] == False +@pytest.mark.fails_on_aws +# bucket policy does not exist def test_get_public_acl_bucket_policy_status(): bucket_name = get_new_bucket() client = get_client() @@ -12843,6 +12883,8 @@ def test_get_authpublic_acl_bucket_policy_status(): assert resp['PolicyStatus']['IsPublic'] == True +@pytest.mark.fails_on_aws +# bucket policy does not exist def test_get_publicpolicy_acl_bucket_policy_status(): bucket_name = get_new_bucket() client = get_client() @@ -12870,7 +12912,8 @@ def test_get_publicpolicy_acl_bucket_policy_status(): resp = client.get_bucket_policy_status(Bucket=bucket_name) assert resp['PolicyStatus']['IsPublic'] == True - +@pytest.mark.fails_on_aws +# bucket policy does not exist def test_get_nonpublicpolicy_acl_bucket_policy_status(): bucket_name = get_new_bucket() client = get_client() @@ -13047,7 +13090,7 @@ def test_block_public_put_bucket_acls(): status, error_code = _get_status_and_error_code(e.response) assert status == 403 - +@pytest.mark.fails_on_aws def test_block_public_object_canned_acls(): bucket_name = get_new_bucket() client = get_client() @@ -13111,6 +13154,8 @@ def test_block_public_policy_with_principal(): client.put_bucket_policy(Bucket=bucket_name, Policy=policy_document) +@pytest.mark.fails_on_aws +# public access control lists (ACLs) are blocked on aws def test_ignore_public_acls(): bucket_name = get_new_bucket() client = get_client()