From 88ccf95fc5a1afb9f6c3bdd2194ca3c196d821be Mon Sep 17 00:00:00 2001 From: "Javier M. Mellid" Date: Wed, 2 Sep 2015 18:46:43 +0200 Subject: [PATCH] s3tests: Add test_multipart_copy_multiple_sizes Signed-off-by: Javier M. Mellid --- s3tests/functional/test_s3.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index b1cecd3..351f8ca 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -4756,6 +4756,33 @@ def test_multipart_upload_multiple_sizes(): (upload, data) = _multipart_upload(bucket, key, 10 * 1024 * 1024) upload.complete_upload() +@attr(assertion='successful') +def test_multipart_copy_multiple_sizes(): + (src_bucket, src_key) = _create_key_with_random_content('foo', 12 * 1024 * 1024) + dst_bucket = get_new_bucket() + dst_keyname="mymultipart" + + k = src_bucket.get_key(src_key.name) + s = k.get_contents_as_string() + + upload = _multipart_copy(src_bucket.name, src_key.name, dst_bucket, dst_keyname, 5 * 1024 * 1024) + upload.complete_upload() + + upload = _multipart_copy(src_bucket.name, src_key.name, dst_bucket, dst_keyname, 5 * 1024 * 1024 + 100 * 1024) + upload.complete_upload() + + upload = _multipart_copy(src_bucket.name, src_key.name, dst_bucket, dst_keyname, 5 * 1024 * 1024 + 600 * 1024) + upload.complete_upload() + + upload = _multipart_copy(src_bucket.name, src_key.name, dst_bucket, dst_keyname, 10 * 1024 * 1024 + 100 * 1024) + upload.complete_upload() + + upload = _multipart_copy(src_bucket.name, src_key.name, dst_bucket, dst_keyname, 10 * 1024 * 1024 + 600 * 1024) + upload.complete_upload() + + upload = _multipart_copy(src_bucket.name, src_key.name, dst_bucket, dst_keyname, 10 * 1024 * 1024) + upload.complete_upload() + @attr(resource='object') @attr(method='put') @attr(operation='check failure on multiple multi-part upload with size too small')