From e0503c9fcd27c7dc6ed04266aa89aead5674ad98 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 20 Nov 2023 22:47:28 -0500 Subject: [PATCH] 304 Not Modified tests still expect etag header test case for https://tracker.ceph.com/issues/45736 Signed-off-by: Casey Bodley (cherry picked from commit 19c17fa49a1264151064d6f38d61a1850330d27e) --- s3tests_boto3/functional/test_s3.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/s3tests_boto3/functional/test_s3.py b/s3tests_boto3/functional/test_s3.py index 5b03947..f7dcfc2 100644 --- a/s3tests_boto3/functional/test_s3.py +++ b/s3tests_boto3/functional/test_s3.py @@ -3006,6 +3006,7 @@ def test_get_object_ifnonematch_good(): status, error_code = _get_status_and_error_code(e.response) assert status == 304 assert e.response['Error']['Message'] == 'Not Modified' + assert e.response['ResponseMetadata']['HTTPHeaders']['etag'] == etag def test_get_object_ifnonematch_failed(): bucket_name = get_new_bucket() @@ -3031,6 +3032,7 @@ def test_get_object_ifmodifiedsince_failed(): client = get_client() client.put_object(Bucket=bucket_name, Key='foo', Body='bar') response = client.get_object(Bucket=bucket_name, Key='foo') + etag = response['ETag'] last_modified = str(response['LastModified']) last_modified = last_modified.split('+')[0] @@ -3045,6 +3047,7 @@ def test_get_object_ifmodifiedsince_failed(): status, error_code = _get_status_and_error_code(e.response) assert status == 304 assert e.response['Error']['Message'] == 'Not Modified' + assert e.response['ResponseMetadata']['HTTPHeaders']['etag'] == etag @pytest.mark.fails_on_dbstore def test_get_object_ifunmodifiedsince_good():