@attr(operation='create w/empty content length')
@attr(assertion='fails 400')
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
@attr('fails_on_rgw')
def test_object_create_bad_contentlength_empty():
key = _setup_bad_object({'Content-Length': ''})
@attr(operation='create w/negative content length')
@attr(assertion='fails 400')
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_contentlength_negative():
key = _setup_bad_object({'Content-Length': -1})
@attr(operation='create w/non-graphic content length')
@attr(assertion='fails 400')
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_contentlength_unreadable():
key = _setup_bad_object({'Content-Length': '\x07'})
@attr(assertion='fails 403')
@nose.with_setup(teardown=_clear_custom_headers)
@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_object_create_bad_contenttype_unreadable():
key = _setup_bad_object({'Content-Type': '\x08'})
@attr(assertion='fails 403')
@nose.with_setup(teardown=_clear_custom_headers)
@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_object_create_bad_authorization_unreadable():
key = _setup_bad_object({'Authorization': '\x07'})
@attr(operation='create w/empty content length')
@attr(assertion='fails 400')
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
@attr('fails_on_rgw')
def test_bucket_create_bad_contentlength_empty():
conn = _create_new_connection()
@attr(operation='create w/negative content length')
@attr(assertion='fails 400')
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_bucket_create_bad_contentlength_negative():
_add_custom_headers({'Content-Length': -1})
e = assert_raises(boto.exception.S3ResponseError, get_new_bucket)
@attr(operation='create w/non-graphic content length')
@attr(assertion='fails 400')
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_bucket_create_bad_contentlength_unreadable():
_add_custom_headers({'Content-Length': '\x07'})
e = assert_raises(boto.exception.S3ResponseError, get_new_bucket)
@attr(assertion='fails 403')
@nose.with_setup(teardown=_clear_custom_headers)
@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_bucket_create_bad_authorization_unreadable():
_add_custom_headers({'Authorization': '\x07'})
e = assert_raises(boto.exception.S3ResponseError, get_new_bucket)
@attr('fails_on_rgw')
-@attr('fails_on_dho')
@attr(resource='bucket')
@attr(method='get')
@attr(operation='list all keys')
@attr(method='head')
@attr(operation='head bucket')
@attr(assertion='succeeds')
-@attr('fails_on_dho')
def test_bucket_head():
bucket = _setup_bucket_request('private')
@attr(method='head')
@attr(operation='read bucket extended information')
@attr(assertion='extended information is getting updated')
-@attr('fails_on_dho')
def test_bucket_head_extended():
bucket = _setup_bucket_request('private')
@attr(method='get')
@attr(operation='authenticated on private bucket/private object with modified response headers')
@attr(assertion='succeeds')
-@attr('fails_on_dho')
@attr('fails_on_rgw')
def test_object_raw_response_headers():
(bucket, key) = _setup_request('private', 'private')
@attr(method='ACLs')
@attr(operation='add second FULL_CONTROL user')
@attr(assertion='works for S3, fails for DHO')
-@attr('fails_on_dho')
def test_bucket_acl_grant_email():
bucket = get_new_bucket()
# add alt user
@attr(operation='set/enable/disable logging target')
@attr(assertion='operations succeed')
@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_logging_toggle():
bucket = get_new_bucket()
log_bucket = s3.main.create_bucket(bucket.name + '-log')
@attr(method='put')
@attr(operation='create and list objects with special names')
@attr(assertion='special names work')
-@attr('fails_on_dho')
def test_bucket_create_special_key_names():
key_names = [' ', '%', '_', '_ ', '_ _', '__']
bucket = _create_keys(keys=key_names)
@attr(method='put')
@attr(operation='copy object to itself')
@attr(assertion='fails')
-@attr('fails_on_dho')
def test_object_copy_to_itself():
bucket = get_new_bucket()
key = bucket.new_key('foo123bar')
@attr(method='put')
@attr(operation='modify object metadata by copying')
@attr(assertion='fails')
-@attr('fails_on_dho')
def test_object_copy_to_itself_with_metadata():
bucket = get_new_bucket()
key = bucket.new_key('foo123bar')
@attr(method='put')
@attr(operation='copy object and change acl')
@attr(assertion='works')
-@attr('fails_on_dho')
def test_object_copy_canned_acl():
bucket = get_new_bucket()
key = bucket.new_key('foo123bar')
@attr(operation='write file in deleted bucket')
@attr(assertion='fail 404')
@attr('fails_on_aws')
-@attr('fails_on_dho')
def test_atomic_write_bucket_gone():
bucket = get_new_bucket()