mirror of https://github.com/ceph/ceph-ansible.git
tests: adapt current testing for collocation scenario
Since we introduced collocation testing scenario, we need to adapt current tests to this new scenario. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/2014/head
parent
88a37ca990
commit
a1ea6e7f59
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue