From 1b3aca44d77a71d194dbcaacc435482710fec70e Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Mon, 5 Dec 2016 16:21:52 -0600 Subject: [PATCH] tests: add a journal_collocation tag to collocated journal tests The test will be skipped if journal_collocation is not True in the group_vars for the scenario. Signed-off-by: Andrew Schoen --- tests/conftest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index f970608ca..6250db627 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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)