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 <gabrioux@redhat.com>
pull/2512/head
Guillaume Abrioux 2018-04-12 09:55:25 +02:00 committed by Sébastien Han
parent 37117071eb
commit 77831ccb7a
1 changed files with 2 additions and 3 deletions

View File

@ -34,8 +34,7 @@ class TestMDSs(object):
hostname=node["vars"]["inventory_hostname"], hostname=node["vars"]["inventory_hostname"],
cluster=node["cluster_name"] cluster=node["cluster_name"]
) )
num_mdss = len(host.ansible.get_variables()["groups"]["mdss"])
output_raw = host.check_output(cmd) output_raw = host.check_output(cmd)
output_json = json.loads(output_raw) output_json = json.loads(output_raw)
active_daemon = output_json["fsmap"]["by_rank"][0]["name"] assert output_json['fsmap']['up'] and output_json['fsmap']['in'] == num_mdss
if active_daemon != hostname:
assert output_json['fsmap']['up:standby'] == 1