Module: check_mk
Branch: master
Commit: 5c1407e381777192622b63ac257c2da81c2f8079
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5c1407e3817771…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Nov 23 14:52:04 2016 +0100
EC status table tests: Enabled testing with different cores
---
tests/mkeventd/test_mkeventd_status.py | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/tests/mkeventd/test_mkeventd_status.py
b/tests/mkeventd/test_mkeventd_status.py
index 0d2fa5d..3a23ae7 100644
--- a/tests/mkeventd/test_mkeventd_status.py
+++ b/tests/mkeventd/test_mkeventd_status.py
@@ -16,10 +16,10 @@ def ensure_core_and_get_connection(site, ec, core):
return live
-# TODO: Enable this once the livestatus columns have been added for status_event_limit_*
-# @pytest.mark.parametrize(("core"), [ "nagios", "cmc" ])
-(a)pytest.mark.parametrize(("core")ore"), [ "cmc" ])
+(a)pytest.mark.parametrize(("core")ore"), [ "nagios", "cmc" ])
def test_command_reload(site, ec, core):
+ print "Checking core: %s" % core
+
live = ensure_core_and_get_connection(site, ec, core)
old_t = live.query_value("GET eventconsolestatus\nColumns:
status_config_load_time\n")
@@ -36,13 +36,16 @@ def test_command_reload(site, ec, core):
# core == None means direct query to status socket
-# TODO: Enable this once the livestatus columns have been added for status_event_limit_*
-# @pytest.mark.parametrize(("core"), [ None, "nagios",
"cmc" ])
-(a)pytest.mark.parametrize(("core")ore"), [ None ])
+(a)pytest.mark.parametrize(("core")ore"), [ None, "nagios", "cmc"
])
def test_status_table_via_core(site, ec, core):
+ print "Checking core: %s" % core
+
live = ensure_core_and_get_connection(site, ec, core)
+ if core == None:
+ result = live.query_table_assoc("GET status\n")
+ else:
+ result = live.query_table_assoc("GET eventconsolestatus\n")
- result = live.query_table_assoc("GET status\n")
assert len(result) == 1
status = result[0]