From: Guillaume Abrioux Date: Thu, 12 Apr 2018 07:55:25 +0000 (+0200) Subject: tests: update tests for mds to cover multimds case X-Git-Tag: v3.1.0beta7~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=77831ccb7a1f99cf289d51928d36a85f4d26b85c;p=ceph-ansible.git tests: update tests for mds to cover multimds case 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 --- diff --git a/tests/functional/tests/mds/test_mds.py b/tests/functional/tests/mds/test_mds.py index 6e88b53b9..3bbc5fc5f 100644 --- a/tests/functional/tests/mds/test_mds.py +++ b/tests/functional/tests/mds/test_mds.py @@ -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