From 77831ccb7a1f99cf289d51928d36a85f4d26b85c Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 12 Apr 2018 09:55:25 +0200 Subject: [PATCH] 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 --- tests/functional/tests/mds/test_mds.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.39.5