forked from TrueCloudLab/s3-tests
boto2: fix byte vs. string comparison in verify_object
the storage class tests were failing on comparisons between the input data and output data: AssertionError: assert 'oFbdZvtRj' == b'oFbdZvtRj' convert the byte representation back to string for comparison Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
parent
9961af4bd2
commit
b1efd0477a
1 changed files with 1 additions and 1 deletions
|
@ -290,7 +290,7 @@ def verify_object(bucket, k, data=None, storage_class=None):
|
||||||
if data:
|
if data:
|
||||||
read_data = k.get_contents_as_string()
|
read_data = k.get_contents_as_string()
|
||||||
|
|
||||||
equal = data == read_data # avoid spamming log if data not equal
|
equal = data == read_data.decode() # avoid spamming log if data not equal
|
||||||
assert equal == True
|
assert equal == True
|
||||||
|
|
||||||
def copy_object_storage_class(src_bucket, src_key, dest_bucket, dest_key, storage_class):
|
def copy_object_storage_class(src_bucket, src_key, dest_bucket, dest_key, storage_class):
|
||||||
|
|
Loading…
Reference in a new issue