tests: test that all docker OSDs are up and in

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
pull/1485/head
Andrew Schoen 2017-05-01 10:45:44 -05:00
parent 06b36fddf9
commit 10d39e98dd
1 changed files with 10 additions and 0 deletions

View File

@ -37,3 +37,13 @@ class TestOSDs(object):
output = Command.check_output(cmd)
phrase = "{num_osds} osds: {num_osds} up, {num_osds} in".format(num_osds=node["total_osds"])
assert phrase in output
@pytest.mark.docker
def test_all_docker_osds_are_up_and_in(self, node, Command):
cmd = "sudo docker exec ceph-mon-ceph-{} ceph --cluster={} --connect-timeout 5 -s".format(
node["vars"]["inventory_hostname"],
node["cluster_name"]
)
output = Command.check_output(cmd)
phrase = "{num_osds} osds: {num_osds} up, {num_osds} in".format(num_osds=node["total_osds"])
assert phrase in output