From: Guillaume Abrioux Date: Mon, 22 Mar 2021 16:54:27 +0000 (+0100) Subject: tests: fix `test_nfs_is_up` test X-Git-Tag: v6.0.3~30 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fb75fce4fa50b0d11ad998c4ad624f85cdc96196;p=ceph-ansible.git tests: fix `test_nfs_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 7e1db0b59929b30b35c75968076b34685d0eac5b) --- diff --git a/tests/functional/tests/nfs/test_nfs_ganesha.py b/tests/functional/tests/nfs/test_nfs_ganesha.py index 42e1b8918..b3c92ebaf 100644 --- a/tests/functional/tests/nfs/test_nfs_ganesha.py +++ b/tests/functional/tests/nfs/test_nfs_ganesha.py @@ -38,9 +38,14 @@ class TestNFSs(object): cluster=cluster ) output = host.check_output(cmd) - daemons = [i for i in json.loads( - output)["servicemap"]["services"]["rgw-nfs"]["daemons"]] - assert hostname in daemons + keys = [i for i in json.loads( + output)["servicemap"]["services"]["rgw-nfs"]["daemons"].keys()] + keys.remove('summary') + daemons = json.loads(output)["servicemap"]["services"]["rgw-nfs"]["daemons"] + hostnames = [] + for key in keys: + hostnames.append(daemons[key]['metadata']['hostname']) + # NOTE (guits): This check must be fixed. (Permission denied error) # @pytest.mark.no_docker