From: zhang Shaowen Date: Fri, 12 Jul 2019 01:36:15 +0000 (+0800) Subject: Add a test case for continuation token in list objects v2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8d623bff0cab9ec89e096ed2d87075203264ef4e;p=s3-tests.git Add a test case for continuation token in list objects v2 Signed-off-by: zhang Shaowen --- diff --git a/s3tests_boto3/functional/test_s3.py b/s3tests_boto3/functional/test_s3.py index 7b151542..16a1a32e 100644 --- a/s3tests_boto3/functional/test_s3.py +++ b/s3tests_boto3/functional/test_s3.py @@ -1392,6 +1392,23 @@ def test_bucket_listv2_continuationtoken_empty(): keys = _get_keys(response) eq(keys, key_names) +@attr(resource='bucket') +@attr(method='get') +@attr(operation='list keys with list-objects-v2') +@attr(assertion='no pagination, non-empty continuationtoken') +@attr('list-objects-v2') +def test_bucket_listv2_continuationtoken(): + key_names = ['bar', 'baz', 'foo', 'quxx'] + bucket_name = _create_objects(keys=key_names) + client = get_client() + + response = client.list_objects_v2(Bucket=bucket_name, ContinuationToken='baz') + eq(response['ContinuationToken'], 'baz') + eq(response['IsTruncated'], False) + key_names2 = ['foo', 'quxx'] + keys = _get_keys(response) + eq(keys, key_names2) + @attr(resource='bucket') @attr(method='get') @attr(operation='list all keys')