]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: adds a docker property to the node fixture
authorAndrew Schoen <aschoen@redhat.com>
Thu, 8 Dec 2016 01:17:09 +0000 (19:17 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 8 Dec 2016 01:17:09 +0000 (19:17 -0600)
This is used to skip tests that will not work with containerized
deployment or atomic hosts.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
tests/conftest.py

index 41233ff367ab4cb559cc4eb3bc6f43dbe6bbba79..815727c590969a47615052dec1edb1a16f6202e7 100644 (file)
@@ -13,9 +13,13 @@ def node(Ansible, Interface, Command, request):
     """
     ansible_vars = Ansible.get_variables()
     node_type = ansible_vars["group_names"][0]
+    docker = ansible_vars.get("docker")
     if not request.node.get_marker(node_type) and not request.node.get_marker('all'):
         pytest.skip("Not a valid test for node type: %s" % node_type)
 
+    if request.node.get_marker("no_docker") and docker:
+        pytest.skip("Not a valid test for 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")
@@ -52,6 +56,7 @@ def node(Ansible, Interface, Command, request):
         cluster_name=cluster_name,
         conf_path=conf_path,
         cluster_address=cluster_address,
+        docker=docker,
     )
     return data