]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
add test case for list with delimiter not skip special keys 295/head
authorTianshan Qu <tianshan@xsky.com>
Fri, 26 Jul 2019 03:15:28 +0000 (11:15 +0800)
committerTianshan Qu <tianshan@xsky.com>
Fri, 26 Jul 2019 03:15:28 +0000 (11:15 +0800)
Signed-off-by: Tianshan Qu <tianshan@xsky.com>
s3tests_boto3/functional/test_s3.py

index 6c306ed9a38af66dc7b3b55834b0a3a0049755bd..fd4df46a353b74dacf0a7c10c925a2f1525f21d7 100644 (file)
@@ -715,6 +715,26 @@ def test_bucket_listv2_delimiter_not_exist():
     eq(keys, key_names)
     eq(prefixes, [])
 
+
+@attr(resource='bucket')
+@attr(method='get')
+@attr(operation='list')
+@attr(assertion='list with delimiter not skip special keys')
+def test_bucket_list_delimiter_not_skip_special():
+    key_names = ['0/'] + ['0/%s' % i for i in range(1000, 1999)]
+    key_names2 = ['1999', '1999#', '1999+', '2000']
+    key_names += key_names2
+    bucket_name = _create_objects(keys=key_names)
+    client = get_client()
+
+    response = client.list_objects(Bucket=bucket_name, Delimiter='/')
+    eq(response['Delimiter'], '/')
+
+    keys = _get_keys(response)
+    prefixes = _get_prefixes(response)
+    eq(keys, key_names2)
+    eq(prefixes, ['0/'])
+
 @attr(resource='bucket')
 @attr(method='get')
 @attr(operation='list under prefix')