test_s3: extend multipart test

Make test use a multipart upload with different part sizes, to exercise
code that triggered #7935.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
Yehuda Sadeh 2014-04-01 12:20:16 -07:00
parent 1b3d766621
commit f2902a042f

View file

@ -4132,10 +4132,13 @@ def test_multipart_upload_contents():
for i in range(0, num_parts): for i in range(0, num_parts):
mp.upload_part_from_file(StringIO(payload), i+1) mp.upload_part_from_file(StringIO(payload), i+1)
last_payload='123'*1024*1024
mp.upload_part_from_file(StringIO(last_payload), 4)
mp.complete_upload() mp.complete_upload()
key=bucket.get_key(key_name) key=bucket.get_key(key_name)
test_string=key.get_contents_as_string() test_string=key.get_contents_as_string()
assert test_string == payload*num_parts assert test_string == payload*num_parts+last_payload
@attr(resource='object') @attr(resource='object')