Tag multipart tests

This commit is contained in:
Andrew Gaul 2024-10-28 14:36:10 -07:00
parent d245097771
commit 65b315b593
3 changed files with 53 additions and 0 deletions

View file

@ -28,6 +28,7 @@ markers =
lifecycle_expiration
lifecycle_transition
list_objects_v2
multipart
object_lock
role_policy
session_policy

View file

@ -397,6 +397,7 @@ def test_object_storage_class():
@pytest.mark.storage_class
@pytest.mark.fails_on_aws
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_object_storage_class_multipart():
sc = configured_storage_classes()
if len(sc) < 2:
@ -443,6 +444,7 @@ def test_object_modify_storage_class():
@pytest.mark.storage_class
@pytest.mark.fails_on_aws
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_object_modify_storage_class_multipart():
_do_test_object_modify_storage_class(_populate_multipart_key, size=11*1024*1024)
@ -476,6 +478,7 @@ def test_object_storage_class_copy():
@pytest.mark.storage_class
@pytest.mark.fails_on_aws
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_object_storage_class_copy_multipart():
_do_test_object_storage_class_copy(_populate_multipart_key, size=9*1024*1024)
@ -625,6 +628,7 @@ def _multipart_upload_enc(bucket, s3_key_name, size, part_size=5*1024*1024,
@pytest.mark.encryption
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_encryption_sse_c_multipart_invalid_chunks_1():
bucket = get_new_bucket()
key = "multipart_enc"
@ -649,6 +653,7 @@ def test_encryption_sse_c_multipart_invalid_chunks_1():
@pytest.mark.encryption
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_encryption_sse_c_multipart_invalid_chunks_2():
bucket = get_new_bucket()
key = "multipart_enc"

View file

@ -5731,6 +5731,7 @@ def _multipart_upload(bucket_name, key, size, part_size=5*1024*1024, client=None
return (upload_id, s, parts)
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_object_copy_versioning_multipart_upload():
bucket_name = get_new_bucket()
client = get_client()
@ -5807,6 +5808,7 @@ def test_object_copy_versioning_multipart_upload():
assert key1_metadata == response['Metadata']
assert content_type == response['ContentType']
@pytest.mark.multipart
def test_multipart_upload_empty():
bucket_name = get_new_bucket()
client = get_client()
@ -5820,6 +5822,7 @@ def test_multipart_upload_empty():
assert error_code == 'MalformedXML'
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_upload_small():
bucket_name = get_new_bucket()
client = get_client()
@ -5895,6 +5898,7 @@ def _check_key_content(src_key, src_bucket_name, dest_key, dest_bucket_name, ver
assert src_data == dest_data
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_copy_small():
src_key = 'foo'
src_bucket_name = _create_key_with_random_content(src_key)
@ -5911,6 +5915,7 @@ def test_multipart_copy_small():
assert size == response['ContentLength']
_check_key_content(src_key, src_bucket_name, dest_key, dest_bucket_name)
@pytest.mark.multipart
def test_multipart_copy_invalid_range():
client = get_client()
src_key = 'source'
@ -5932,6 +5937,7 @@ def test_multipart_copy_invalid_range():
# TODO: remove fails_on_rgw when https://tracker.ceph.com/issues/40795 is resolved
@pytest.mark.fails_on_rgw
@pytest.mark.multipart
def test_multipart_copy_improper_range():
client = get_client()
src_key = 'source'
@ -5961,6 +5967,7 @@ def test_multipart_copy_improper_range():
assert error_code == 'InvalidArgument'
@pytest.mark.multipart
def test_multipart_copy_without_range():
client = get_client()
src_key = 'source'
@ -5987,6 +5994,7 @@ def test_multipart_copy_without_range():
_check_key_content(src_key, src_bucket_name, dest_key, dest_bucket_name)
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_copy_special_names():
src_bucket_name = get_new_bucket()
@ -6021,6 +6029,7 @@ def _check_content_using_range(key, bucket_name, data, step):
assert body == data[ofs:end+1]
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_upload():
bucket_name = get_new_bucket()
key="mymultipart"
@ -6079,6 +6088,7 @@ def check_configure_versioning_retry(bucket_name, status, expected_string):
assert expected_string == read_status
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_copy_versioned():
src_bucket_name = get_new_bucket()
dest_bucket_name = get_new_bucket()
@ -6125,6 +6135,7 @@ def _check_upload_multipart_resend(bucket_name, key, objlen, resend_parts):
_check_content_using_range(key, bucket_name, data, 10000000)
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_upload_resend_part():
bucket_name = get_new_bucket()
key="mymultipart"
@ -6136,6 +6147,7 @@ def test_multipart_upload_resend_part():
_check_upload_multipart_resend(bucket_name, key, objlen, [1,2])
_check_upload_multipart_resend(bucket_name, key, objlen, [0,1,2,3,4,5])
@pytest.mark.multipart
def test_multipart_upload_multiple_sizes():
bucket_name = get_new_bucket()
key="mymultipart"
@ -6166,6 +6178,7 @@ def test_multipart_upload_multiple_sizes():
client.complete_multipart_upload(Bucket=bucket_name, Key=key, UploadId=upload_id, MultipartUpload={'Parts': parts})
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_copy_multiple_sizes():
src_key = 'foo'
src_bucket_name = _create_key_with_random_content(src_key, 12*1024*1024)
@ -6204,6 +6217,7 @@ def test_multipart_copy_multiple_sizes():
client.complete_multipart_upload(Bucket=dest_bucket_name, Key=dest_key, UploadId=upload_id, MultipartUpload={'Parts': parts})
_check_key_content(src_key, src_bucket_name, dest_key, dest_bucket_name)
@pytest.mark.multipart
def test_multipart_upload_size_too_small():
bucket_name = get_new_bucket()
key="mymultipart"
@ -6251,10 +6265,12 @@ def _do_test_multipart_upload_contents(bucket_name, key, num_parts):
return all_payload
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_upload_contents():
bucket_name = get_new_bucket()
_do_test_multipart_upload_contents(bucket_name, 'mymultipart', 3)
@pytest.mark.multipart
def test_multipart_upload_overwrite_existing_object():
bucket_name = get_new_bucket()
client = get_client()
@ -6280,6 +6296,7 @@ def test_multipart_upload_overwrite_existing_object():
assert test_string == payload*num_parts
@pytest.mark.multipart
def test_abort_multipart_upload():
bucket_name = get_new_bucket()
key="mymultipart"
@ -6292,6 +6309,7 @@ def test_abort_multipart_upload():
response = client.list_objects_v2(Bucket=bucket_name, Prefix=key)
assert 'Contents' not in response
@pytest.mark.multipart
def test_abort_multipart_upload_not_found():
bucket_name = get_new_bucket()
client = get_client()
@ -6304,6 +6322,7 @@ def test_abort_multipart_upload_not_found():
assert error_code == 'NoSuchUpload'
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_list_multipart_upload():
bucket_name = get_new_bucket()
client = get_client()
@ -6335,6 +6354,7 @@ def test_list_multipart_upload():
client.abort_multipart_upload(Bucket=bucket_name, Key=key2, UploadId=upload_id3)
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_list_multipart_upload_owner():
bucket_name = get_new_bucket()
@ -6380,6 +6400,7 @@ def test_list_multipart_upload_owner():
finally:
client1.abort_multipart_upload(Bucket=bucket_name, Key=key1, UploadId=upload1)
@pytest.mark.multipart
def test_multipart_upload_missing_part():
bucket_name = get_new_bucket()
client = get_client()
@ -6399,6 +6420,7 @@ def test_multipart_upload_missing_part():
assert status == 400
assert error_code == 'InvalidPart'
@pytest.mark.multipart
def test_multipart_upload_incorrect_etag():
bucket_name = get_new_bucket()
client = get_client()
@ -6419,6 +6441,7 @@ def test_multipart_upload_incorrect_etag():
assert error_code == 'InvalidPart'
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_get_part():
bucket_name = get_new_bucket()
client = get_client()
@ -6462,6 +6485,7 @@ def test_multipart_get_part():
@pytest.mark.encryption
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_sse_c_get_part():
bucket_name = get_new_bucket()
client = get_client()
@ -6516,6 +6540,7 @@ def test_multipart_sse_c_get_part():
assert error_code == 'InvalidPart'
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_single_get_part():
bucket_name = get_new_bucket()
client = get_client()
@ -6558,6 +6583,7 @@ def test_multipart_single_get_part():
assert error_code == 'InvalidPart'
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_non_multipart_get_part():
bucket_name = get_new_bucket()
client = get_client()
@ -6579,6 +6605,7 @@ def test_non_multipart_get_part():
@pytest.mark.encryption
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_non_multipart_sse_c_get_part():
bucket_name = get_new_bucket()
client = get_client()
@ -7243,6 +7270,7 @@ def test_atomic_write_bucket_gone():
assert status == 404
assert error_code == 'NoSuchBucket'
@pytest.mark.multipart
def test_atomic_multipart_upload_write():
bucket_name = get_new_bucket()
client = get_client()
@ -7281,6 +7309,7 @@ class ActionOnCount:
if self.count == self.trigger_count:
self.result = self.action()
@pytest.mark.multipart
def test_multipart_resend_first_finishes_last():
bucket_name = get_new_bucket()
client = get_client()
@ -7778,6 +7807,7 @@ def test_versioning_obj_create_versions_remove_special_names():
assert len(version_ids) == len(contents)
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_versioning_obj_create_overwrite_multipart():
bucket_name = get_new_bucket()
client = get_client()
@ -9107,6 +9137,7 @@ def test_lifecycle_deletemarker_expiration():
assert len(total_expire_versions) == 2
@pytest.mark.lifecycle
@pytest.mark.multipart
def test_lifecycle_set_multipart():
bucket_name = get_new_bucket()
client = get_client()
@ -9124,6 +9155,7 @@ def test_lifecycle_set_multipart():
@pytest.mark.lifecycle_expiration
@pytest.mark.fails_on_aws
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_lifecycle_multipart_expiration():
bucket_name = get_new_bucket()
client = get_client()
@ -9955,6 +9987,7 @@ def _check_content_using_range_enc(client, bucket_name, key, data, size, step, e
@pytest.mark.encryption
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_encryption_sse_c_multipart_upload():
bucket_name = get_new_bucket()
client = get_client()
@ -10001,6 +10034,7 @@ def test_encryption_sse_c_multipart_upload():
@pytest.mark.encryption
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_encryption_sse_c_unaligned_multipart_upload():
bucket_name = get_new_bucket()
client = get_client()
@ -10048,6 +10082,7 @@ def test_encryption_sse_c_unaligned_multipart_upload():
@pytest.mark.encryption
# TODO: remove this fails_on_rgw when I fix it
@pytest.mark.fails_on_rgw
@pytest.mark.multipart
def test_encryption_sse_c_multipart_invalid_chunks_1():
bucket_name = get_new_bucket()
client = get_client()
@ -10076,6 +10111,7 @@ def test_encryption_sse_c_multipart_invalid_chunks_1():
@pytest.mark.encryption
# TODO: remove this fails_on_rgw when I fix it
@pytest.mark.fails_on_rgw
@pytest.mark.multipart
def test_encryption_sse_c_multipart_invalid_chunks_2():
bucket_name = get_new_bucket()
client = get_client()
@ -10102,6 +10138,7 @@ def test_encryption_sse_c_multipart_invalid_chunks_2():
assert status == 400
@pytest.mark.encryption
@pytest.mark.multipart
def test_encryption_sse_c_multipart_bad_download():
bucket_name = get_new_bucket()
client = get_client()
@ -10370,6 +10407,7 @@ def test_sse_kms_not_declared():
@pytest.mark.encryption
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_sse_kms_multipart_upload():
kms_keyid = get_main_kms_keyid()
bucket_name = get_new_bucket()
@ -10415,6 +10453,7 @@ def test_sse_kms_multipart_upload():
@pytest.mark.encryption
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_sse_kms_multipart_invalid_chunks_1():
kms_keyid = get_main_kms_keyid()
kms_keyid2 = get_secondary_kms_keyid()
@ -10442,6 +10481,7 @@ def test_sse_kms_multipart_invalid_chunks_1():
@pytest.mark.encryption
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_sse_kms_multipart_invalid_chunks_2():
kms_keyid = get_main_kms_keyid()
bucket_name = get_new_bucket()
@ -11306,6 +11346,7 @@ def test_versioning_bucket_atomic_upload_return_version_id():
response = client.put_object(Bucket=bucket_name, Key=key)
assert not 'VersionId' in response
@pytest.mark.multipart
def test_versioning_bucket_multipart_upload_return_version_id():
content_type='text/bla'
objlen = 30 * 1024 * 1024
@ -12571,6 +12612,7 @@ def test_object_lock_delete_object_with_retention():
assert response['ResponseMetadata']['HTTPStatusCode'] == 204
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_object_lock_delete_multipart_object_with_retention():
bucket_name = get_new_bucket_name()
client = get_client()
@ -12772,6 +12814,7 @@ def test_object_lock_delete_object_with_legal_hold_on():
client.put_object_legal_hold(Bucket=bucket_name, Key=key, LegalHold={'Status':'OFF'})
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_object_lock_delete_multipart_object_with_legal_hold_on():
bucket_name = get_new_bucket_name()
client = get_client()
@ -13261,6 +13304,7 @@ def test_ignore_public_acls():
check_access_denied(alt_client.get_object, Bucket=bucket_name, Key='key1')
@pytest.mark.multipart
def test_multipart_upload_on_a_bucket_with_policy():
bucket_name = get_new_bucket()
client = get_client()
@ -13553,6 +13597,7 @@ def test_sse_s3_default_method_head():
@pytest.mark.bucket_encryption
@pytest.mark.sse_s3
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_sse_s3_default_multipart_upload():
bucket_name = get_new_bucket()
client = get_client()
@ -13776,6 +13821,7 @@ def test_object_checksum_sha256():
@pytest.mark.checksum
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_checksum_sha256():
bucket = get_new_bucket()
client = get_client()
@ -13841,6 +13887,7 @@ def test_multipart_checksum_sha256():
@pytest.mark.checksum
@pytest.mark.fails_on_dbstore
@pytest.mark.multipart
def test_multipart_checksum_3parts():
bucket = get_new_bucket()
client = get_client()