tests: adds a way to mark docker only tests

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit 06b36fddf9)
pull/1486/head
Andrew Schoen 2017-05-01 10:45:03 -05:00
parent 2eb098ea5f
commit 30c4f6a13e
1 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,9 @@ def node(Ansible, Interface, Command, request):
if request.node.get_marker("no_docker") and docker: if request.node.get_marker("no_docker") and docker:
pytest.skip("Not a valid test for containerized deployments or atomic hosts") 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") 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: if request.node.get_marker("journal_collocation") and not journal_collocation_test:
pytest.skip("Scenario is not using journal collocation") pytest.skip("Scenario is not using journal collocation")