Module: check_mk
Branch: master
Commit: 6e22df6ef1de1700f6f3be4056a8d93cd56e7f44
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6e22df6ef1de17…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 13 13:16:05 2017 +0100
Unreachable tests: Tell nagios to check for commands more often
Change-Id: Ibf22df96bd2a0c6755123c18dcdd88a45b6ec292
---
tests/notifications/test_unreachable_notifications.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/notifications/test_unreachable_notifications.py
b/tests/notifications/test_unreachable_notifications.py
index 4a8ecf6..8717275 100644
--- a/tests/notifications/test_unreachable_notifications.py
+++ b/tests/notifications/test_unreachable_notifications.py
@@ -62,6 +62,9 @@ def scenario(request, web, site):
}
web.set_ruleset("extra_host_conf:notification_options", rule_result)
+ # Make nagios check more often for incoming commands
+
site.write_file("etc/nagios/nagios.d/zzz_test_unreachable_notifications.cfg",
+ "command_check_interval=1s\n")
web.activate_changes()
@@ -80,9 +83,13 @@ def scenario(request, web, site):
site.live.command("[%d] ENABLE_HOST_CHECK;notify-test-child" %
time.time())
site.live.command("[%d] ENABLE_HOST_CHECK;notify-test-parent" %
time.time())
+
site.delete_file("etc/nagios/nagios.d/zzz_test_unreachable_notifications.cfg")
+
web.delete_host("notify-test-child")
web.delete_host("notify-test-parent")
+ web.activate_changes()
+
@pytest.fixture(scope="function")
def initial_state(site, scenario):