]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
304 Not Modified tests still expect etag header 533/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 21 Nov 2023 03:47:28 +0000 (22:47 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 21 Nov 2023 03:47:30 +0000 (22:47 -0500)
test case for https://tracker.ceph.com/issues/45736

Signed-off-by: Casey Bodley <cbodley@redhat.com>
s3tests_boto3/functional/test_s3.py

index 1273d8a15e2c4a6e9c42393d58ffc9449f100117..1c380612dd61325337b6fce6b6b42171eaf2d642 100644 (file)
@@ -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():