Compare commits

...

2 commits

Author SHA1 Message Date
Javier M. Mellid
7ca4eb54b0 Add fails_on_rgw on multipart copy part tests
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
2016-04-05 12:41:37 +02:00
Sage Weil
7731afb5a0 remove invalid multi-part upload tests
these fail on rgw

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-28 14:21:20 -04:00

View file

@ -4927,6 +4927,7 @@ def _check_key_content(src, dst):
@attr(resource='object') @attr(resource='object')
@attr(method='put') @attr(method='put')
@attr(operation='check multipart copies with single small part') @attr(operation='check multipart copies with single small part')
@attr('fails_on_rgw')
def test_multipart_copy_small(): def test_multipart_copy_small():
(src_bucket, src_key) = _create_key_with_random_content('foo') (src_bucket, src_key) = _create_key_with_random_content('foo')
dst_bucket = get_new_bucket() dst_bucket = get_new_bucket()
@ -5033,6 +5034,7 @@ def test_multipart_upload_multiple_sizes():
upload.complete_upload() upload.complete_upload()
@attr(assertion='successful') @attr(assertion='successful')
@attr('fails_on_rgw')
def test_multipart_copy_multiple_sizes(): def test_multipart_copy_multiple_sizes():
(src_bucket, src_key) = _create_key_with_random_content('foo', 12 * 1024 * 1024) (src_bucket, src_key) = _create_key_with_random_content('foo', 12 * 1024 * 1024)
dst_bucket = get_new_bucket() dst_bucket = get_new_bucket()
@ -5179,36 +5181,6 @@ def test_list_multipart_upload():
upload2.cancel_upload() upload2.cancel_upload()
upload3.cancel_upload() upload3.cancel_upload()
@attr(resource='object')
@attr(method='put')
@attr(operation='multi-part upload with missing part')
def test_multipart_upload_missing_part():
bucket = get_new_bucket()
key_name = "mymultipart"
mp = bucket.initiate_multipart_upload(key_name)
mp.upload_part_from_file(StringIO('\x00'), 1)
xml = mp.to_xml()
xml = xml.replace('<PartNumber>1</PartNumber>', '<PartNumber>9999</PartNumber>')
e = assert_raises(boto.exception.S3ResponseError, bucket.complete_multipart_upload, key_name, mp.id, xml)
eq(e.status, 400)
eq(e.reason.lower(), 'bad request') # some proxies vary the case
eq(e.error_code, 'InvalidPart')
@attr(resource='object')
@attr(method='put')
@attr(operation='multi-part upload with incorrect ETag')
def test_multipart_upload_incorrect_etag():
bucket = get_new_bucket()
key_name = "mymultipart"
mp = bucket.initiate_multipart_upload(key_name)
mp.upload_part_from_file(StringIO('\x00'), 1)
xml = mp.to_xml()
xml = xml.replace('<ETag>"93b885adfe0da089cdf634904fd59f71"</ETag>', '<ETag>"ffffffffffffffffffffffffffffffff"</ETag>')
e = assert_raises(boto.exception.S3ResponseError, bucket.complete_multipart_upload, key_name, mp.id, xml)
eq(e.status, 400)
eq(e.reason.lower(), 'bad request') # some proxies vary the case
eq(e.error_code, 'InvalidPart')
def _simple_http_req_100_cont(host, port, is_secure, method, resource): def _simple_http_req_100_cont(host, port, is_secure, method, resource):
""" """
Send the specified request w/expect 100-continue Send the specified request w/expect 100-continue