]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/rgw: pass encoding to Key.get_content_as_string()
authorKefu Chai <kchai@redhat.com>
Mon, 6 Apr 2020 15:11:21 +0000 (23:11 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 7 Apr 2020 13:51:23 +0000 (21:51 +0800)
commitfcf4de3855f01e80b90d246529916a5915fe413d
treefe13d54ad2bcb481a3eac648a42a80da4a90cd39
parent9ccf88d95fa5d184c56ac638bed37c3e3101356d
test/rgw: pass encoding to Key.get_content_as_string()

we assume that boto.Key.get_content_as_string() returns str instead of
bytes, and compare the return value with a string, so, to ensure that
lhs and rhs are both strings, we need to decode the returned content.

since we always store strings composed with ASCII, it's safe to use
'ascii' to decode them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/rgw/rgw_multi/tests.py
src/test/rgw/rgw_multi/tests_az.py
src/test/rgw/rgw_multi/zone_cloud.py