Module: check_mk
Branch: master
Commit: 42f4813a30fcf3f17897d601cf335d4cc094d3c6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=42f4813a30fcf3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 20 15:22:18 2018 +0100
Resetting check config variable structure before loading the checks
Change-Id: I1a47cd0f8cee18598f503539c8fd3ced82cec9e0
---
cmk_base/checks.py | 3 +++
tests/cmk_base/test_checks.py | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/cmk_base/checks.py b/cmk_base/checks.py
index 12668b6..dcdda9e 100644
--- a/cmk_base/checks.py
+++ b/cmk_base/checks.py
@@ -103,6 +103,9 @@ def get_plugin_paths(*dirs):
# If a check or check.include is both found in local/ and in the
# normal structure, then only the file in local/ must be read!
def load_checks(filelist):
+ # Initialize some data structures which are populated while loading the checks
+ _check_variables.clear()
+
loaded_files = set()
check_variable_defaults = {}
ignored_variable_types = [ type(lambda: None), type(os) ]
diff --git a/tests/cmk_base/test_checks.py b/tests/cmk_base/test_checks.py
index fca7e8d..731befa 100644
--- a/tests/cmk_base/test_checks.py
+++ b/tests/cmk_base/test_checks.py
@@ -206,7 +206,7 @@ check_info["test_check_2"] = {
# Test whether or not factory settings and checkgroup parameters work
-def test_test_check_factory_settings(request, test_cfg, site, web):
+def test_check_factory_settings(request, test_cfg, site, web):
test_check_path = "local/share/check_mk/checks/test_check_3"
def cleanup():