]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
s3: test retry after error instead of 100-continue
authorCasey Bodley <cbodley@redhat.com>
Thu, 22 May 2025 18:33:00 +0000 (14:33 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 22 May 2025 18:33:00 +0000 (14:33 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
s3tests_boto3/functional/test_s3.py

index 6723d71d80b6420ca46a112eb4ba753e9708844f..83dfe2104dff63f5e681bb167d457666cb536540 100644 (file)
@@ -6772,6 +6772,20 @@ def test_100_continue():
     status = _simple_http_req_100_cont(host, port, is_secure, 'PUT', resource)
     assert status == '100'
 
+@pytest.mark.fails_on_rgw # https://tracker.ceph.com/issues/64841
+def test_100_continue_error_retry():
+    client = get_client()
+    bucket_name = get_new_bucket(client)
+
+    # expects put_object() to use 'Expect: 100-continue'. send one request to a
+    # non-existent bucket, expecting '404 NoSuchBucket' instead of '100 Continue'
+    not_bucket_name = f'{bucket_name}-but-doesnt-exist'
+    e = assert_raises(ClientError, client.put_object, Bucket=not_bucket_name, Key='foo', Body='bar')
+    assert 404 == _get_status(e.response)
+
+    # send another request on the same connection
+    client.put_object(Bucket=bucket_name, Key='foo', Body='bar')
+
 def test_set_cors():
     bucket_name = get_new_bucket()
     client = get_client()