mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 03:47:22 +00:00
s3_test: add test for listing objects with special prefix
Check for ceph issue #5362. Prefix starts with underscore. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
parent
b9a5858523
commit
f3fdbc384b
1 changed files with 14 additions and 0 deletions
|
@ -3790,6 +3790,20 @@ def test_bucket_create_special_key_names():
|
||||||
names = [e.name for e in list(li)]
|
names = [e.name for e in list(li)]
|
||||||
eq(names, key_names)
|
eq(names, key_names)
|
||||||
|
|
||||||
|
@attr(resource='bucket')
|
||||||
|
@attr(method='get')
|
||||||
|
@attr(operation='create and list objects with underscore as prefix, list using prefix')
|
||||||
|
@attr(assertion='listing works correctly')
|
||||||
|
def test_bucket_list_special_prefix():
|
||||||
|
key_names = ['_bla/1', '_bla/2', '_bla/3', '_bla/4', 'abcd']
|
||||||
|
bucket = _create_keys(keys=key_names)
|
||||||
|
|
||||||
|
li = bucket.get_all_keys()
|
||||||
|
eq(len(li), 5)
|
||||||
|
|
||||||
|
li2 = bucket.get_all_keys(prefix='_bla/')
|
||||||
|
eq(len(li2), 4)
|
||||||
|
|
||||||
@attr(resource='object')
|
@attr(resource='object')
|
||||||
@attr(method='put')
|
@attr(method='put')
|
||||||
@attr(operation='copy zero sized object in same bucket')
|
@attr(operation='copy zero sized object in same bucket')
|
||||||
|
|
Loading…
Reference in a new issue