Skip to content

Commit 9b39360

Browse files
author
Evgeniy Zayats
committed
tests: fix test_bucket_listv2_continuationtoken_empty
Test passed an incorrect continuation token and expected it to success Signed-off-by: Evgeniy Zayats <[email protected]>
1 parent 143df8b commit 9b39360

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

s3tests_boto3/functional/test_s3.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,17 +1548,15 @@ def test_bucket_list_marker_empty():
15481548

15491549

15501550
@pytest.mark.list_objects_v2
1551-
@pytest.mark.skip(reason="Potential Bug")
15521551
def test_bucket_listv2_continuationtoken_empty():
15531552
key_names = ["bar", "baz", "foo", "quxx"]
15541553
bucket_name = _create_objects(keys=key_names)
15551554
client = get_client()
15561555

1557-
response = client.list_objects_v2(Bucket=bucket_name, ContinuationToken="")
1558-
assert response["ContinuationToken"] == ""
1559-
assert response["IsTruncated"] == False
1560-
keys = _get_keys(response)
1561-
assert keys == key_names
1556+
e = assert_raises(ClientError, client.list_objects_v2, Bucket=bucket_name, ContinuationToken="")
1557+
status, error_code = _get_status_and_error_code(e.response)
1558+
assert status == 400
1559+
assert error_code == "InvalidArgument"
15621560

15631561

15641562
@pytest.mark.list_objects_v2

0 commit comments

Comments
 (0)