Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark failed on aws tests #584

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions s3tests_boto3/functional/test_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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)
Expand All @@ -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})
Expand All @@ -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})
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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='}
Expand All @@ -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'}
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'}
Expand Down Expand Up @@ -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'
Expand Down
56 changes: 52 additions & 4 deletions s3tests_boto3/functional/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -7174,6 +7200,8 @@ def trigger(self):
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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -12116,7 +12152,8 @@ def test_object_lock_put_obj_lock_with_days_and_years():
assert status == 400
assert error_code == 'MalformedXML'


@pytest.mark.fails_on_aws
# AssertionError: assert 'InvalidArgument' == 'InvalidRetentionPeriod'
@pytest.mark.fails_on_dbstore
def test_object_lock_put_obj_lock_invalid_days():
bucket_name = get_new_bucket_name()
Expand All @@ -12135,6 +12172,8 @@ def test_object_lock_put_obj_lock_invalid_days():
assert error_code == 'InvalidRetentionPeriod'


@pytest.mark.fails_on_aws
# AssertionError: assert 'InvalidArgument' == 'InvalidRetentionPeriod'
@pytest.mark.fails_on_dbstore
def test_object_lock_put_obj_lock_invalid_years():
bucket_name = get_new_bucket_name()
Expand Down Expand Up @@ -12812,8 +12851,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()
Expand All @@ -12822,12 +12862,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()
Expand All @@ -12843,6 +12886,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()
Expand Down Expand Up @@ -12870,7 +12915,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()
Expand Down Expand Up @@ -13047,7 +13093,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()
Expand Down Expand Up @@ -13111,6 +13157,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()
Expand Down