cmc-unreachable_disabled]
Message-ID: <59e860c9.rdhYk73Jrbq5ugVA%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 3a329b8d4fd62e5b2156436d261f02fb73de2f6c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3a329b8d4fd62e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 19 09:53:30 2017 +0200
Fixed wrong test case test_parent_down_child_state_changes[cmc-unreachable_disabled]
Change-Id: Ib90ee017001a87e6a76dd4e3ef9f86e8373dfae9
---
tests/notifications/test_unreachable_notifications.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/notifications/test_unreachable_notifications.py
b/tests/notifications/test_unreachable_notifications.py
index 589640d..4a8ecf6 100644
--- a/tests/notifications/test_unreachable_notifications.py
+++ b/tests/notifications/test_unreachable_notifications.py
@@ -276,8 +276,8 @@ def test_parent_down_child_state_changes(scenario, site,
initial_state):
# - set child down, expect UNREACHABLE notification
assert site.get_host_state("notify-test-child") == STATE_UP
site.send_host_check_result("notify-test-child", STATE_DOWN,
"DOWN", expected_state=STATE_UNREACHABLE)
-
log.check_logged("HOST ALERT: notify-test-child;UNREACHABLE;HARD;1;")
+
if scenario.unreachable_enabled:
log.check_logged("HOST NOTIFICATION:
check-mk-notify;notify-test-child;UNREACHABLE;check-mk-notify;")
else:
@@ -285,17 +285,18 @@ def test_parent_down_child_state_changes(scenario, site,
initial_state):
# - set child up, expect UP notification
site.send_host_check_result("notify-test-child", STATE_UP, "UP")
-
log.check_logged("HOST ALERT: notify-test-child;UP;HARD;1;")
- if scenario.core == "cmc" or scenario.unreachable_enabled:
+ if scenario.unreachable_enabled:
log.check_logged("HOST NOTIFICATION:
check-mk-notify;notify-test-child;")
+ else:
+ log.check_not_logged("HOST NOTIFICATION:
check-mk-notify;notify-test-child;")
# - set child down, expect UNREACHABLE notification
assert site.get_host_state("notify-test-child") == STATE_UP
site.send_host_check_result("notify-test-child", STATE_DOWN,
"DOWN", expected_state=STATE_UNREACHABLE)
-
log.check_logged("HOST ALERT: notify-test-child;UNREACHABLE;HARD;1;")
+
if scenario.unreachable_enabled:
log.check_logged("HOST NOTIFICATION:
check-mk-notify;notify-test-child;UNREACHABLE;check-mk-notify;")
else: