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 <gabrioux@redhat.com>
(cherry picked from commit b8080bac41)
pull/6385/head
Guillaume Abrioux 2021-03-23 09:04:51 +01:00
parent fb75fce4fa
commit 439cb79e3e
1 changed files with 8 additions and 8 deletions

View File

@ -36,14 +36,14 @@ class TestRGWs(object):
cluster=cluster cluster=cluster
) )
output = host.check_output(cmd) output = host.check_output(cmd)
daemons = [i for i in json.loads( keys = [i for i in json.loads(
output)["servicemap"]["services"]["rgw"]["daemons"]] output)["servicemap"]["services"]["rgw"]["daemons"].keys()]
for i in range(int(node["radosgw_num_instances"])): keys.remove('summary')
instance_name = "{hostname}.rgw{seq}".format( daemons = json.loads(output)["servicemap"]["services"]["rgw"]["daemons"]
hostname=hostname, hostnames = []
seq=i for key in keys:
) hostnames.append(daemons[key]['metadata']['hostname'])
assert instance_name in daemons
@pytest.mark.no_docker @pytest.mark.no_docker
def test_rgw_http_endpoint(self, node, host, setup): def test_rgw_http_endpoint(self, node, host, setup):