From: Kefu Chai Date: Mon, 6 Apr 2020 15:20:32 +0000 (+0800) Subject: test/rgw/rgw_multi/tests.py: decode retval of bucket.get_policy() X-Git-Tag: v14.2.10~17^2~53 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3478b149ca18cc920a7fee44e5647c844a9b1dba;p=ceph.git test/rgw/rgw_multi/tests.py: decode retval of bucket.get_policy() return value of bucket.get_policy() is a bytes, so we need to decode it before comparing it with a string, since the content of policy is ASCII, it'd be suffice to decode it with 'ascii'. Signed-off-by: Kefu Chai (cherry picked from commit ea63b52b1705e80977ce1fe6d2dc276ea9477344) --- diff --git a/src/test/rgw/rgw_multi/tests.py b/src/test/rgw/rgw_multi/tests.py index 01529c59d9d..201b2815738 100644 --- a/src/test/rgw/rgw_multi/tests.py +++ b/src/test/rgw/rgw_multi/tests.py @@ -1106,7 +1106,7 @@ def test_set_bucket_policy(): buckets, zone_bucket = create_bucket_per_zone_in_realm() for _, bucket in zone_bucket: bucket.set_policy(policy) - assert(bucket.get_policy() == policy) + assert(bucket.get_policy().decode('ascii') == policy) def test_bucket_sync_disable(): zonegroup = realm.master_zonegroup()