forked from TrueCloudLab/s3-tests
rgw: add AWS4 auth testing support
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
This commit is contained in:
parent
d7f3992f33
commit
914b0f36c1
2 changed files with 1028 additions and 265 deletions
File diff suppressed because it is too large
Load diff
|
@ -256,6 +256,69 @@ def test_bucket_list_delimiter_alt():
|
|||
eq(prefix_names, ['ba', 'ca'])
|
||||
|
||||
|
||||
@attr(resource='bucket')
|
||||
@attr(method='get')
|
||||
@attr(operation='list')
|
||||
@attr(assertion='percentage delimiter characters')
|
||||
def test_bucket_list_delimiter_percentage():
|
||||
bucket = _create_keys(keys=['b%ar', 'b%az', 'c%ab', 'foo'])
|
||||
|
||||
li = bucket.list(delimiter='%')
|
||||
eq(li.delimiter, '%')
|
||||
|
||||
# foo contains no 'a' and so is a complete key
|
||||
(keys,prefixes) = _get_keys_prefixes(li)
|
||||
names = [e.name for e in keys]
|
||||
eq(names, ['foo'])
|
||||
|
||||
# bar, baz, and cab should be broken up by the 'a' delimiters
|
||||
prefix_names = [e.name for e in prefixes]
|
||||
eq(len(prefixes), 2)
|
||||
eq(prefix_names, ['b%', 'c%'])
|
||||
|
||||
|
||||
@attr(resource='bucket')
|
||||
@attr(method='get')
|
||||
@attr(operation='list')
|
||||
@attr(assertion='whitespace delimiter characters')
|
||||
def test_bucket_list_delimiter_whitespace():
|
||||
bucket = _create_keys(keys=['b ar', 'b az', 'c ab', 'foo'])
|
||||
|
||||
li = bucket.list(delimiter=' ')
|
||||
eq(li.delimiter, ' ')
|
||||
|
||||
# foo contains no 'a' and so is a complete key
|
||||
(keys,prefixes) = _get_keys_prefixes(li)
|
||||
names = [e.name for e in keys]
|
||||
eq(names, ['foo'])
|
||||
|
||||
# bar, baz, and cab should be broken up by the 'a' delimiters
|
||||
prefix_names = [e.name for e in prefixes]
|
||||
eq(len(prefixes), 2)
|
||||
eq(prefix_names, ['b ', 'c '])
|
||||
|
||||
|
||||
@attr(resource='bucket')
|
||||
@attr(method='get')
|
||||
@attr(operation='list')
|
||||
@attr(assertion='dot delimiter characters')
|
||||
def test_bucket_list_delimiter_dot():
|
||||
bucket = _create_keys(keys=['b.ar', 'b.az', 'c.ab', 'foo'])
|
||||
|
||||
li = bucket.list(delimiter='.')
|
||||
eq(li.delimiter, '.')
|
||||
|
||||
# foo contains no 'a' and so is a complete key
|
||||
(keys,prefixes) = _get_keys_prefixes(li)
|
||||
names = [e.name for e in keys]
|
||||
eq(names, ['foo'])
|
||||
|
||||
# bar, baz, and cab should be broken up by the 'a' delimiters
|
||||
prefix_names = [e.name for e in prefixes]
|
||||
eq(len(prefixes), 2)
|
||||
eq(prefix_names, ['b.', 'c.'])
|
||||
|
||||
|
||||
@attr(resource='bucket')
|
||||
@attr(method='get')
|
||||
@attr(operation='list')
|
||||
|
|
Loading…
Reference in a new issue