mirror of
https://github.com/ceph/s3-tests.git
synced 2025-02-23 15:54:31 +00:00
s3: disable request_checksum_calculation for test_multipart_checksum_upload_fallback
the test sends create_multipart_upload() with a requested checksum
algorithm, and upload_part() requests without. newer boto automatically
adds `x-amz-sdk-checksum-algorithm: CRC32` when nothing is specified,
so we have to explicitly disable that behavior via botocore config
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit dfb8fc5b16
)
This commit is contained in:
parent
dd14c0d1fd
commit
2ee4f2424d
1 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
import boto3
|
||||
import botocore.session
|
||||
import botocore.config
|
||||
from botocore.exceptions import ClientError
|
||||
from botocore.exceptions import ParamValidationError
|
||||
from botocore.handlers import validate_bucket_name
|
||||
|
@ -13838,7 +13839,11 @@ def test_multipart_checksum_3parts():
|
|||
@pytest.mark.fails_on_dbstore
|
||||
def test_multipart_checksum_upload_fallback():
|
||||
bucket = get_new_bucket()
|
||||
client = get_client()
|
||||
|
||||
# to test client.upload_part() without a checksum header,
|
||||
# we have to disable its calculation in botocore config
|
||||
config = botocore.config.Config(request_checksum_calculation = 'when_required')
|
||||
client = get_client(config)
|
||||
|
||||
key = "mpu_cksum_fallback"
|
||||
alg = 'SHA256'
|
||||
|
|
Loading…
Add table
Reference in a new issue