@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_md5_invalid():
key = _setup_bad_object({'Content-MD5':'AWS HAHAHA'})
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_md5_wrong():
key = _setup_bad_object({'Content-MD5':'YWJyYWNhZGFicmE='})
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_md5_empty():
key = _setup_bad_object({'Content-MD5': ''})
# strangely, amazon doesn't report an error with a non-expect 100 also, our
# error comes back as html, and not xml as I normally expect
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
@attr('fails_on_rgw')
def test_object_create_bad_expect_mismatch():
key = _setup_bad_object({'Expect': 200})
# this is a really long test, and I don't know if it's valid...
# again, accepts this with no troubles
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_expect_empty():
key = _setup_bad_object({'Expect': ''})
key.set_contents_from_string('bar')
# this is a really long test..
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
@attr('fails_on_rgw')
def test_object_create_bad_expect_unreadable():
key = _setup_bad_object({'Expect': '\x07'})
@nose.with_setup(teardown=_clear_custom_headers)
@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_object_create_bad_contentlength_negative():
key = _setup_bad_object({'Content-Length': -1})
@nose.with_setup(teardown=_clear_custom_headers)
@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_object_create_bad_contentlength_unreadable():
key = _setup_bad_object({'Content-Length': '\x07'})
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
@attr('fails_on_rgw')
def test_object_create_bad_contentlength_mismatch_above():
content = 'bar'
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_contentlength_mismatch_below():
content = 'bar'
length = len(content) - 1
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_object_create_bad_authorization_invalid():
key = _setup_bad_object({'Authorization': 'AWS HAHAHA'})
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_date_invalid():
key = _setup_bad_object({'Date': 'Bad Date'})
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_date_empty():
key = _setup_bad_object({'Date': ''})
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_date_unreadable():
key = _setup_bad_object({'Date': '\x07'})
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
def test_object_create_bad_date_none():
key = _setup_bad_object(remove=('Date',))
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_bucket_create_contentlength_none():
_add_custom_headers(remove=('Content-Length',))
get_new_bucket()
@nose.with_setup(teardown=_clear_custom_headers)
-@attr('fails_on_rgw')
def test_object_acl_create_contentlength_none():
bucket = get_new_bucket()
key = bucket.new_key('foo')
eq(names, ['foo'])
-@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_bucket_list_delimiter_basic():
bucket = _create_keys(keys=['foo/bar', 'foo/baz/xyzzy', 'quux/thud', 'asdf'])
# just testing that we can do the delimeter and prefix logic on non-slashes
-@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_bucket_list_delimiter_alt():
bucket = _create_keys(keys=['bar', 'baz', 'cab', 'foo'])
eq(prefixes, [])
-@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_bucket_list_prefix_delimiter_basic():
bucket = _create_keys(keys=['foo/bar', 'foo/baz/xyzzy', 'quux/thud', 'asdf'])
eq(names, key_names[1:])
-@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_bucket_list_maxkeys_zero():
bucket = _create_keys(keys=['bar', 'baz', 'foo', 'quxx'])
eq(li, [])
-@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_bucket_list_maxkeys_none():
key_names = ['bar', 'baz', 'foo', 'quxx']
bucket = _create_keys(keys=key_names)
eq(li.MaxKeys, '1000')
-@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_bucket_list_maxkeys_invalid():
bucket = _create_keys(keys=['bar', 'baz', 'foo', 'quxx'])
eq(e.error_code, 'InvalidArgument')
-@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_bucket_list_marker_none():
key_names = ['bar', 'baz', 'foo', 'quxx']
bucket = _create_keys(keys=key_names)
eq(li.marker, '')
-@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_bucket_list_marker_empty():
key_names = ['bar', 'baz', 'foo', 'quxx']
bucket = _create_keys(keys=key_names)
eq(names, key_names)
-@attr('fails_on_rgw')
-@attr('fails_on_dho')
def test_bucket_list_marker_unreadable():
key_names = ['bar', 'baz', 'foo', 'quxx']
bucket = _create_keys(keys=key_names)
)
-@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_bucket_list_return_data():
key_names = ['bar', 'baz', 'foo']
bucket = _create_keys(keys=key_names)
_compare_dates(key.last_modified, key_data['last_modified'])
-@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_bucket_list_object_time():
bucket = _create_keys(keys=['foo'])
eq(res.reason, 'Forbidden')
-# 403 TimeTooSkewed
-@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_object_raw_authenticated():
(bucket, key) = _setup_request('public-read', 'public-read')
eq(res.reason, 'OK')
-# 403 TimeTooSkewed
-@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_object_raw_authenticated_bucket_acl():
(bucket, key) = _setup_request('private', 'public-read')
eq(res.reason, 'OK')
-# 403 TimeTooSkewed
-@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_object_raw_authenticated_object_acl():
(bucket, key) = _setup_request('public-read', 'private')
eq(res.reason, 'OK')
-# 403 TimeTooSkewed
-@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_object_raw_authenticated_bucket_gone():
(bucket, key) = _setup_request('public-read', 'public-read')
key.delete()
eq(res.reason, 'Not Found')
-# 403 TimeTooSkewed
-@attr('fails_on_dho')
-@attr('fails_on_rgw')
def test_object_raw_authenticated_object_gone():
(bucket, key) = _setup_request('public-read', 'public-read')
key.delete()
eq(res.reason, 'OK')
-@attr('fails_on_rgw')
def test_object_raw_put_authenticated():
bucket = get_new_bucket()
key = bucket.new_key('foo')
_check_bucket_acl_grant_can_writeacp(bucket)
-@attr('fails_on_dho')
def test_bucket_acl_grant_nonexist_user():
bucket = get_new_bucket()
# add alt user
bucket.set_acl('private')
-# This test will fail on DH Objects. DHO allows multiple users with one account, which
-# would violate the uniqueness requirement of a user's email. As such, DHO users are
-# created without an email.
-@attr('fails_on_dho')
def test_bucket_acl_grant_email():
bucket = get_new_bucket()
# add alt user
# this test goes outside the user-configure prefix because it needs to
# control the initial character of the bucket name
-@attr('fails_on_rgw')
@nose.with_setup(
setup=lambda: nuke_prefixed_buckets(prefix='a'+get_prefix()),
teardown=lambda: nuke_prefixed_buckets(prefix='a'+get_prefix()),
# this test goes outside the user-configure prefix because it needs to
# control the initial character of the bucket name
-@attr('fails_on_rgw')
@nose.with_setup(
setup=lambda: nuke_prefixed_buckets(prefix='0'+get_prefix()),
teardown=lambda: nuke_prefixed_buckets(prefix='0'+get_prefix()),