Module: check_mk
Branch: master
Commit: 1c0eb0eda6ddb0865796b3174af22724a25180c6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1c0eb0eda6ddb0…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Feb 23 09:25:48 2018 +0100
Tentative fix for some mkeventd tests.
Change-Id: Ib170f3b711b175a956c4ba49332611d71ed24a1b
---
tests/mkeventd/test_mkeventd_status.py | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/tests/mkeventd/test_mkeventd_status.py
b/tests/mkeventd/test_mkeventd_status.py
index 8582fe9..17f3ee5 100644
--- a/tests/mkeventd/test_mkeventd_status.py
+++ b/tests/mkeventd/test_mkeventd_status.py
@@ -4,6 +4,7 @@
import pytest
import time
import ast
+import pathlib2 as pathlib
from testlib import web, ec, cmk_path, CMKEventConsole
#
@@ -43,19 +44,26 @@ class FakeStatusSocket(object):
@pytest.fixture(scope="function")
+def settings():
+ mkeventd.g_settings = cmk.ec.settings.settings(
+ '1.2.3i45', pathlib.Path('/omd/sites/foo'),
pathlib.Path('/omd/sites/foo/etc/check_mk'), [])
+ return mkeventd.g_settings
+
+
+(a)pytest.fixture(scope="function")
def config():
mkeventd.load_configuration()
@pytest.fixture(scope="function")
-def status_server():
- mkeventd.g_status_server = mkeventd.StatusServer()
+def status_server(settings):
+ mkeventd.g_status_server = mkeventd.StatusServer(settings)
return mkeventd.g_status_server
@pytest.fixture(scope="function")
-def event_status():
- mkeventd.g_event_status = mkeventd.EventStatus()
+def event_status(settings):
+ mkeventd.g_event_status = mkeventd.EventStatus(settings)
return mkeventd.g_event_status