]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: add a journal_collocation tag to collocated journal tests
authorAndrew Schoen <aschoen@redhat.com>
Mon, 5 Dec 2016 22:21:52 +0000 (16:21 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 6 Dec 2016 20:56:20 +0000 (14:56 -0600)
The test will be skipped if journal_collocation is not True in the
group_vars for the scenario.

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

index f970608cad9ee1841ea1d444c90554cc31b540bf..6250db6272151121cddbcce1b8a666c957790c31 100644 (file)
@@ -8,6 +8,9 @@ def CephNode(Ansible, Interface, Command, request):
     if not request.node.get_marker(node_type) and not request.node.get_marker('all'):
         pytest.skip("Not a valid test for node type")
 
+    if request.node.get_marker("journal_collocation") and not vars.get("journal_collocation"):
+        pytest.skip("Skipping because scenario is not using journal collocation")
+
     osd_ids = []
     if node_type == "osds":
         result = Command.check_output('sudo ls /var/lib/ceph/osd/ | grep -oP "\d+$"')
@@ -39,3 +42,6 @@ def pytest_collection_modifyitems(session, config, items):
             item.add_marker(pytest.mark.rgws)
         else:
             item.add_marker(pytest.mark.all)
+
+        if "journal_collocation" in test_path:
+            item.add_marker(pytest.mark.journal_collocation)