Module: check_mk
Branch: master
Commit: d4b668675ef3184e6321cc8e766d4d2590f09676
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d4b668675ef318…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Fri Nov 10 11:20:54 2017 +0100
df: Make tests compatible with test_service_extra_conf
Change-Id: Ibaebb6e30393af165ee33922e5af4d9a1ccfbe8e
---
tests/checks/test_df.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/checks/test_df.py b/tests/checks/test_df.py
index 13bf982..accc630 100644
--- a/tests/checks/test_df.py
+++ b/tests/checks/test_df.py
@@ -29,6 +29,7 @@ pytestmark = pytest.mark.check
])
def test_df_discovery_with_parse(check_manager, monkeypatch, info, result,
include_volume_name):
import cmk_base.checks
+ import cmk_base
# NOTE: This is the result of trying to mock the the ruleset variable itself instead of
the
# host_extra_conf_merged function. It did not work. Maybe we can get it to work
at a later stage.
@@ -39,3 +40,4 @@ def test_df_discovery_with_parse(check_manager, monkeypatch, info,
result, inclu
check = check_manager.get_check("df")
monkeypatch.setitem(cmk_base.checks._check_contexts["df"],
"host_extra_conf_merged", lambda _, __: {"include_volume_name":
include_volume_name})
assert check.run_discovery(check.run_parse(info)) == result
+ cmk_base.config_cache.clear_all()