Module: check_mk
Branch: master
Commit: 2235882f077bc2aa5b3e46824c92a82d3dfa5472
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2235882f077bc2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 1 12:30:27 2017 +0100
Tests: Simplified things a bit; Changed some cmc related paths
Change-Id: I3fc59c05a12058f45bed03d451c874eff13f1b5d
---
tests/Makefile | 7 +++----
tests/conftest.py | 10 +---------
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index 4ea7e68..4b528a2 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -31,7 +31,7 @@ test-bandit:
# Currently only care about high severity reported issues. Once this is
# reached, go and enable the medium/low checks.
CMK_DIR="$(realpath ..)" ; \
- CMC_DIR="$(realpath ../../cmc/)" ; \
+ ENTERPRISE_DIR="$(realpath ../enterprise)" ; \
bandit \
-c "$$CMK_DIR/bandit.yaml" \
-r \
@@ -40,9 +40,8 @@ test-bandit:
"$$CMK_DIR" \
$$(grep -l python "$$CMK_DIR"/bin/*) \
"$$CMK_DIR"/{checks,inventory}/* \
- "$$CMC_DIR" \
- $$(grep -l python "$$CMC_DIR"/bin/*) \
- "$$CMC_DIR"/agents/{plugins,bakery}/*
+ $$(grep -l python "$$ENTERPRISE_DIR"/bin/*) \
+ "$$ENTERPRISE_DIR"/agents/{plugins,bakery}/*
test-bandit-ci:
diff --git a/tests/conftest.py b/tests/conftest.py
index ebb7d16..1666bc6 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -12,7 +12,7 @@ def cmk_path():
def cmc_path():
- return os.path.realpath(cmk_path() + "/../cmc")
+ return os.path.realpath(cmk_path() + "/enterprise")
def add_python_paths():
@@ -22,13 +22,6 @@ def add_python_paths():
sys.path.insert(0, cmk_path())
-# Some pre-testing to ensure the developer uses the correct branches in all involved
repos
-def ensure_equal_branches():
- cmk_branch = os.popen("cd \"%s\" ; git rev-parse --abbrev-ref
HEAD" % cmk_path()).read().strip()
- cmc_branch = os.popen("cd \"%s\" ; git rev-parse --abbrev-ref
HEAD" % cmc_path()).read().strip()
-
- assert cmk_branch == cmc_branch, "Different branches (%s != %s)\n" %
(cmk_branch, cmc_branch)
-
#
# Make tests classification possible to only execute in specific environments.
# For example only on the CI server.
@@ -128,7 +121,6 @@ def _site_id():
#
add_python_paths()
-ensure_equal_branches()
# Session fixtures must be in conftest.py to work properly
@pytest.fixture(scope="session", autouse=True)