mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #1485 from ceph/docker-osd-tests
tests: test all docker osds are up and inpull/1449/merge
commit
05743e1a7e
|
@ -20,6 +20,9 @@ def node(Ansible, Interface, Command, request):
|
|||
if request.node.get_marker("no_docker") and docker:
|
||||
pytest.skip("Not a valid test for containerized deployments or atomic hosts")
|
||||
|
||||
if request.node.get_marker("docker") and not docker:
|
||||
pytest.skip("Not a valid test for non-containerized deployments or atomic hosts")
|
||||
|
||||
journal_collocation_test = ansible_vars.get("journal_collocation") or ansible_vars.get("dmcrypt_journal_collocation")
|
||||
if request.node.get_marker("journal_collocation") and not journal_collocation_test:
|
||||
pytest.skip("Scenario is not using journal collocation")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue