Module: check_mk
Branch: master
Commit: 971e1b723499fc1e753e422518a7008b8b3a90d7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=971e1b723499fc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 9 12:32:21 2017 +0100
tests: cleaned up special test case filter for crawl job
Change-Id: I3d54f086c5cdba37573fae8dc6b501531c4f1339
---
pytest.ini | 1 +
tests/conftest.py | 26 --------------------------
tests/web/test_crawl.py | 2 +-
3 files changed, 2 insertions(+), 27 deletions(-)
diff --git a/pytest.ini b/pytest.ini
index e1e59d1..1c3715b 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -8,4 +8,5 @@ markers =
pylint: Mark a test as pylint test.
git: Mark a test to be executed in the Git repository context
packaging: This is a test to execute to verify the packaging of the testbuilds.
+ gui_crawl: All linked pages of the Web interface are visited and searched for errors
html_gentest: Generate test cases for htmllib refactoring.
diff --git a/tests/conftest.py b/tests/conftest.py
index 0ae62d3..a005291 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -22,32 +22,6 @@ def add_python_paths():
sys.path.insert(0, cmk_path())
-#
-# Make tests classification possible to only execute in specific environments.
-# For example only on the CI server.
-#
-
-def pytest_addoption(parser):
- parser.addoption("-E", action="store", metavar="NAME",
- help="only run tests matching the environment NAME.")
-
-
-def pytest_configure(config):
- config.addinivalue_line("markers",
- "env(name): mark test to run only on named environment. Some long running
tests "
- "are only meant to be executed on the CI server. Those tests use the "
- "\'(a)pytest.mark.env(\"ci-server\")' marker. If you want to
execute them, add "
- "\"-E ci-server\" to the py.test command.")
-
-
-def pytest_runtest_setup(item):
- envmarker = item.get_marker("env")
- if envmarker is not None:
- envname = envmarker.args[0]
- if envname != item.config.getoption("-E"):
- pytest.skip("test requires env %r" % envname)
-
-
def pytest_cmdline_main(config):
# Some special tests are not executed in a site environment
if config.getoption('markexpr') in [ "packaging", "git",
"html_gentest" ]:
diff --git a/tests/web/test_crawl.py b/tests/web/test_crawl.py
index 9fc2aa3..228d20c 100644
--- a/tests/web/test_crawl.py
+++ b/tests/web/test_crawl.py
@@ -279,7 +279,7 @@ class SetQueue(Queue.Queue):
class TestCrawler(object):
- @pytest.mark.env("ci-server")
+ @pytest.mark.gui_crawl
def test_crawl(self, site):
self.stats = {}
self.todo = SetQueue()