Module: check_mk
Branch: master
Commit: ad81a56d6feaf114551111c5b65fa53c6813b402
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ad81a56d6feaf1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Nov 28 14:40:03 2018 +0100
Add simple integration test for check_mkevents execution
Change-Id: I6d29e04f7da6c626a4bbeb2a191dbcbd4bd892d3
---
tests/integration/cmk/ec/test_check_mkevents.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tests/integration/cmk/ec/test_check_mkevents.py
b/tests/integration/cmk/ec/test_check_mkevents.py
new file mode 100644
index 0000000..d889d11
--- /dev/null
+++ b/tests/integration/cmk/ec/test_check_mkevents.py
@@ -0,0 +1,16 @@
+import subprocess
+import pytest
+
+
+(a)pytest.mark.parametrize("args"args", [
+ [],
+ ["-a"],
+])
+def test_simple_check_mkevents_call(site, args):
+ p = site.execute(
+ ["./check_mkevents"] + args + ["somehost"],
+ stdout=subprocess.PIPE,
+ cwd=site.path("lib/nagios/plugins"))
+ output = p.stdout.read()
+ assert output == "OK - no events for somehost\n"
+ assert p.wait() == 0