diff --git a/tests/functional/tests/mds/test_mds.py b/tests/functional/tests/mds/test_mds.py index a8665868c..6e88b53b9 100644 --- a/tests/functional/tests/mds/test_mds.py +++ b/tests/functional/tests/mds/test_mds.py @@ -34,6 +34,8 @@ class TestMDSs(object): hostname=node["vars"]["inventory_hostname"], cluster=node["cluster_name"] ) - output = host.check_output(cmd) - daemons = json.loads(output)["fsmap"]["by_rank"][0]["name"] - assert hostname in daemons + 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 diff --git a/tests/functional/tests/mgr/test_mgr.py b/tests/functional/tests/mgr/test_mgr.py index 146ac0062..488c7ccb9 100644 --- a/tests/functional/tests/mgr/test_mgr.py +++ b/tests/functional/tests/mgr/test_mgr.py @@ -39,6 +39,11 @@ class TestMGRs(object): hostname=node["vars"]["inventory_hostname"], cluster=node["cluster_name"] ) - output = host.check_output(cmd) - daemons = json.loads(output)["mgrmap"]["active_name"] - assert hostname in daemons + output_raw = host.check_output(cmd) + output_json = json.loads(output_raw) + daemons = output_json['mgrmap']['active_name'] + standbys = [i['name'] for i in output_json['mgrmap']['standbys']] + result = hostname in daemons + if not result: + result = hostname in standbys + assert result