ceph / s3-tests

Compatibility tests for S3 clones
MIT License
297 stars 287 forks source link

test_bucket_list_prefix_basic and test_bucket_list_prefix_delimiter_basic needed bypass #481

Open shirady opened 1 year ago

shirady commented 1 year ago

Hi, I found out that the prefix response is not decoded back in the field of prefix when using list_objects. As you probably know when using boto3 the client sets automatically the encoding type url (see https://github.com/boto/boto3/issues/816):

“Encoding type is automatically set because there are unicode characters which can break the XML parser. To work around the issue, we automatically set the encoding type parameter to url if the customer hasn't already set it. We then decode the keys on the way back, again only if we provided that parameter.”

That why is needs to decode the fields back. I found out that the prefix response is not decoded back in the field of a prefix when using list_objects, I opened boto3 an issue about it, but until they fix it we can use a bypass for the problematic line: eq(response['Prefix'], 'foo/')

I suggest that we will decode response['Prefix']and insert a comment so that it will be clear that it is just a bypass. This case when using the list_objects with prefix, appears in 2 tests: test_bucket_list_prefix_basic and test_bucket_list_prefix_delimiter_basic

shirady commented 1 year ago

An update from boto3 issue - this might be due to boto3 version which is 1.23.10 (whereas in 1.23.33 for the latest version they did not reproduce this bug).