mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-23 03:38:41 +00:00
s3tests_boto3/functional: Addition of s3test
Adding a new s3test for deleting an object with 'null' version id which contains bucket versioning. Signed-off-by: Kalpesh Pandya <kapandya@redhat.com>
This commit is contained in:
parent
6861c3d810
commit
34e3285d5f
1 changed files with 21 additions and 0 deletions
|
@ -7356,6 +7356,27 @@ def test_versioning_obj_create_read_remove_head():
|
|||
|
||||
clean_up_bucket(client, bucket_name, key, version_ids)
|
||||
|
||||
def test_delete_object_with_null_version_id():
|
||||
bucket_name = get_new_bucket()
|
||||
|
||||
client = get_client()
|
||||
key = 'testobjfoo'
|
||||
content = 'fooz'
|
||||
client.put_object(Bucket=bucket_name, Key=key, Body=content)
|
||||
|
||||
client.put_bucket_versioning(Bucket=bucket_name, VersioningConfiguration={'Status': 'Enabled'})
|
||||
num_versions = 1
|
||||
|
||||
(version_ids, contents) = create_multiple_versions(client, bucket_name, key, num_versions)
|
||||
|
||||
response = client.list_object_versions(Bucket=bucket_name)
|
||||
assert len(response['Versions']) == num_versions+1
|
||||
|
||||
client.delete_object(Bucket=bucket_name, Key=key, VersionId='null')
|
||||
response_2 = client.list_object_versions(Bucket=bucket_name)
|
||||
assert len(response_2['Versions']) == num_versions
|
||||
|
||||
|
||||
def test_versioning_obj_plain_null_version_removal():
|
||||
bucket_name = get_new_bucket()
|
||||
check_versioning(bucket_name, None)
|
||||
|
|
Loading…
Reference in a new issue