Module: check_mk
Branch: master
Commit: 2febb3e9a67fdd44cf77b16a476183490706e7a3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2febb3e9a67fdd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 12 08:47:28 2019 +0100
Fixed web API tests after introducing the meta_data host attribute
Change-Id: Iddf8b3f8443477d8c9726e507832e419a17f5cf5
---
tests/testlib/__init__.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index 2ceefbe..a2341c9 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -1320,6 +1320,10 @@ class CMKWebSession(WebSession):
assert host["hostname"] == hostname
assert host["path"] == folder
+
+ # Ignore the automatically generated meta_data attribute for the moment
+ del host["attributes"]["meta_data"]
+
assert host["attributes"] == attributes
# hosts: List of tuples of this structure: (hostname, folder_path, attributes)
@@ -1364,6 +1368,10 @@ class CMKWebSession(WebSession):
host = self.get_host(hostname)
assert host["hostname"] == hostname
+
+ # Ignore the automatically generated meta_data attribute for the moment
+ del host["attributes"]["meta_data"]
+
assert host["attributes"] == attributes
def edit_hosts(self, edit_hosts):