lifecycle: Fix test_lifecycle_expiration_header_* testcases

Few checks were incorrectly mapped when switched to 'assert'. This
commit fixes the same.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit 29b0e27e49)
This commit is contained in:
Soumya Koduri 2023-03-07 15:17:47 +05:30 committed by Casey Bodley
parent 02fdf70f0a
commit d6a9168220

View file

@ -8346,7 +8346,7 @@ def test_lifecycle_expiration_header_tags_head():
# stat the object, check header # stat the object, check header
response = client.head_object(Bucket=bucket_name, Key=key1) response = client.head_object(Bucket=bucket_name, Key=key1)
assert response['ResponseMetadata']['HTTPStatusCode'] == 200 assert response['ResponseMetadata']['HTTPStatusCode'] == 200
assert check_lifecycle_expiration_header(response, datetime.datetime.now(None), 'rule1', 1) assert check_lifecycle_expiration_header(response, datetime.datetime.now(None), 'rule1', 1) == False
@pytest.mark.lifecycle @pytest.mark.lifecycle
@pytest.mark.lifecycle_expiration @pytest.mark.lifecycle_expiration
@ -8392,7 +8392,7 @@ def test_lifecycle_expiration_header_and_tags_head():
# stat the object, check header # stat the object, check header
response = client.head_object(Bucket=bucket_name, Key=key1) response = client.head_object(Bucket=bucket_name, Key=key1)
assert response['ResponseMetadata']['HTTPStatusCode'] == 200 assert response['ResponseMetadata']['HTTPStatusCode'] == 200
assert check_lifecycle_expiration_header(response, datetime.datetime.now(None), 'rule1', 1) assert check_lifecycle_expiration_header(response, datetime.datetime.now(None), 'rule1', 1) == False
@pytest.mark.lifecycle @pytest.mark.lifecycle
def test_lifecycle_set_noncurrent(): def test_lifecycle_set_noncurrent():