]> 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>
Sun, 14 Jun 2020 08:34:52 +0000 (16:34 +0800)
commite0f75af23a48c4072bd99e21bcdeab8a6e90199b
tree67ca15fd183a9c63426b2e82cae6e13c92443eb2
parent940edd8337946be24051a9f774e61507ca04f9a0
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>
(cherry picked from commit fcf4de3855f01e80b90d246529916a5915fe413d)
src/test/rgw/rgw_multi/tests.py
src/test/rgw/rgw_multi/tests_az.py
src/test/rgw/rgw_multi/zone_cloud.py