From 439cb79e3e32e8ad279c6d7b8c2d015570eb450c Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 23 Mar 2021 09:04:51 +0100 Subject: [PATCH] tests: fix `test_rgw_is_up` test The data structure seems to have been modified in ceph@master (quincy). This commit update the test accordingly. Signed-off-by: Guillaume Abrioux (cherry picked from commit b8080bac41f7604c3f37a2db214e4091f64720b4) --- tests/functional/tests/rgw/test_rgw.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/functional/tests/rgw/test_rgw.py b/tests/functional/tests/rgw/test_rgw.py index 4b7af28d2..958450d4e 100644 --- a/tests/functional/tests/rgw/test_rgw.py +++ b/tests/functional/tests/rgw/test_rgw.py @@ -36,14 +36,14 @@ class TestRGWs(object): cluster=cluster ) output = host.check_output(cmd) - daemons = [i for i in json.loads( - output)["servicemap"]["services"]["rgw"]["daemons"]] - for i in range(int(node["radosgw_num_instances"])): - instance_name = "{hostname}.rgw{seq}".format( - hostname=hostname, - seq=i - ) - assert instance_name in daemons + keys = [i for i in json.loads( + output)["servicemap"]["services"]["rgw"]["daemons"].keys()] + keys.remove('summary') + daemons = json.loads(output)["servicemap"]["services"]["rgw"]["daemons"] + hostnames = [] + for key in keys: + hostnames.append(daemons[key]['metadata']['hostname']) + @pytest.mark.no_docker def test_rgw_http_endpoint(self, node, host, setup):