]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
s3_test: add test for listing objects with special prefix
authorYehuda Sadeh <yehuda@inktank.com>
Mon, 17 Jun 2013 18:44:01 +0000 (11:44 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 26 Jul 2013 04:53:33 +0000 (21:53 -0700)
Check for ceph issue #5362. Prefix starts with underscore.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
s3tests/functional/test_s3.py

index 8c2c780726c0987fc5ffd770c52bde1e2ca9cd90..cc9171d91e0d07b04bcfb591ef33f00037533fff 100644 (file)
@@ -3928,6 +3928,20 @@ def test_bucket_create_special_key_names():
     names = [e.name for e in list(li)]
     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(method='put')
 @attr(operation='copy zero sized object in same bucket')