]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: update tests for mds to cover multimds case
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 12 Apr 2018 07:55:25 +0000 (09:55 +0200)
committerSébastien Han <seb@redhat.com>
Thu, 12 Apr 2018 16:20:58 +0000 (18:20 +0200)
in case of multimds we must check for the number of mds up instead of
just checking if the hostname of the node is in the fsmap.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
tests/functional/tests/mds/test_mds.py

index 6e88b53b90bf3510b10d15a8a75cb37f34f147a9..3bbc5fc5fb1ce44be68c9e8e82b457ec0dc37db8 100644 (file)
@@ -34,8 +34,7 @@ class TestMDSs(object):
             hostname=node["vars"]["inventory_hostname"],
             cluster=node["cluster_name"]
         )
+        num_mdss = len(host.ansible.get_variables()["groups"]["mdss"])
         output_raw = host.check_output(cmd)
         output_json = json.loads(output_raw)
-        active_daemon = output_json["fsmap"]["by_rank"][0]["name"]
-        if active_daemon != hostname:
-            assert output_json['fsmap']['up:standby'] == 1
+        assert output_json['fsmap']['up'] and output_json['fsmap']['in'] == num_mdss
\ No newline at end of file