If a cluster changes over time, the test broke. When looking at stored
metrics, assert that our inventory hosts are a subset of the stored
metrics as opposed to doing an equality check.
Signed-off-by: Zack Cerza <zack@redhat.com>
def extract_hostname(fragment):
return fragment['text']
- metric_hosts = map(extract_hostname, obj)
- assert sorted(map(lambda s: s.split('.')[0], ceph_hosts)) == \
- sorted(metric_hosts)
+ metric_hosts = set(map(extract_hostname, obj))
+ assert set(map(lambda s: s.split('.')[0], ceph_hosts)).issubset(metric_hosts)