mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-21 23:29:47 +00:00
Updating lifecycle_noncur* tests to include objects with instance empty
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit 7362e522cc
)
This commit is contained in:
parent
a139a18b27
commit
1effe15a40
1 changed files with 19 additions and 3 deletions
|
@ -9327,6 +9327,14 @@ def test_lifecycle_noncur_transition():
|
||||||
|
|
||||||
bucket = get_new_bucket()
|
bucket = get_new_bucket()
|
||||||
client = get_client()
|
client = get_client()
|
||||||
|
|
||||||
|
# before enabling versioning, create a plain entry
|
||||||
|
# which should get transitioned/expired similar to
|
||||||
|
# other non-current versioned entries.
|
||||||
|
key = 'test1/a'
|
||||||
|
content = 'fooz'
|
||||||
|
client.put_object(Bucket=bucket, Key=key, Body=content)
|
||||||
|
|
||||||
check_configure_versioning_retry(bucket, "Enabled", "Enabled")
|
check_configure_versioning_retry(bucket, "Enabled", "Enabled")
|
||||||
|
|
||||||
rules = [
|
rules = [
|
||||||
|
@ -9352,7 +9360,7 @@ def test_lifecycle_noncur_transition():
|
||||||
lifecycle = {'Rules': rules}
|
lifecycle = {'Rules': rules}
|
||||||
response = client.put_bucket_lifecycle_configuration(Bucket=bucket, LifecycleConfiguration=lifecycle)
|
response = client.put_bucket_lifecycle_configuration(Bucket=bucket, LifecycleConfiguration=lifecycle)
|
||||||
|
|
||||||
create_multiple_versions(client, bucket, "test1/a", 3)
|
create_multiple_versions(client, bucket, "test1/a", 2)
|
||||||
create_multiple_versions(client, bucket, "test1/b", 3)
|
create_multiple_versions(client, bucket, "test1/b", 3)
|
||||||
|
|
||||||
init_keys = list_bucket_storage_class(client, bucket)
|
init_keys = list_bucket_storage_class(client, bucket)
|
||||||
|
@ -9608,6 +9616,14 @@ def test_lifecycle_noncur_cloud_transition():
|
||||||
|
|
||||||
bucket = get_new_bucket()
|
bucket = get_new_bucket()
|
||||||
client = get_client()
|
client = get_client()
|
||||||
|
|
||||||
|
# before enabling versioning, create a plain entry
|
||||||
|
# which should get transitioned/expired similar to
|
||||||
|
# other non-current versioned entries.
|
||||||
|
key = 'test1/a'
|
||||||
|
content = 'fooz'
|
||||||
|
client.put_object(Bucket=bucket, Key=key, Body=content)
|
||||||
|
|
||||||
check_configure_versioning_retry(bucket, "Enabled", "Enabled")
|
check_configure_versioning_retry(bucket, "Enabled", "Enabled")
|
||||||
|
|
||||||
rules = [
|
rules = [
|
||||||
|
@ -9632,8 +9648,8 @@ def test_lifecycle_noncur_cloud_transition():
|
||||||
|
|
||||||
keys = ['test1/a', 'test1/b']
|
keys = ['test1/a', 'test1/b']
|
||||||
|
|
||||||
for k in keys:
|
create_multiple_versions(client, bucket, "test1/a", 2)
|
||||||
create_multiple_versions(client, bucket, k, 3)
|
create_multiple_versions(client, bucket, "test1/b", 3)
|
||||||
|
|
||||||
init_keys = list_bucket_storage_class(client, bucket)
|
init_keys = list_bucket_storage_class(client, bucket)
|
||||||
assert len(init_keys['STANDARD']) == 6
|
assert len(init_keys['STANDARD']) == 6
|
||||||
|
|
Loading…
Reference in a new issue