Module: check_mk
Branch: master
Commit: 7849054fda60611958c068066fc9593aa0af351d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7849054fda6061…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Tue Apr 23 08:49:39 2019 +0200
fix broken fireeye test
Change-Id: Iea903cd8d832c79fc66180519effd7a3b522c6a6
---
.../checks/generictests/datasets/fireeye_content.py | 18 ++++++++++++++++++
.../datasets/fireeye_content_assert_update_age.py | 19 +++++++++++++++++++
.../datasets/fireeye_content_update_failed.py | 19 +++++++++++++++++++
3 files changed, 56 insertions(+)
diff --git a/tests/unit/checks/generictests/datasets/fireeye_content.py
b/tests/unit/checks/generictests/datasets/fireeye_content.py
new file mode 100644
index 0000000..b99edcb
--- /dev/null
+++ b/tests/unit/checks/generictests/datasets/fireeye_content.py
@@ -0,0 +1,18 @@
+# yapf: disable
+
+
+checkname = 'fireeye_content'
+
+
+info = [['456.180', '1', '2016/02/26 15:42:06']]
+
+freeze_time = '2017-07-16T08:21:00'
+
+discovery = {'': [(None, {})]}
+
+
+checks = {'': [(None,
+ {},
+ [(0, 'Last update: 2016/02/26 15:42:06', []),
+ (0, 'Age: 506 d', []),
+ (0, 'Security version: 456.180', [])])]}
diff --git a/tests/unit/checks/generictests/datasets/fireeye_content_assert_update_age.py
b/tests/unit/checks/generictests/datasets/fireeye_content_assert_update_age.py
new file mode 100644
index 0000000..15bffbf
--- /dev/null
+++ b/tests/unit/checks/generictests/datasets/fireeye_content_assert_update_age.py
@@ -0,0 +1,19 @@
+# yapf: disable
+
+
+checkname = 'fireeye_content'
+
+
+info = [['456.180', '0', '2016/02/26 15:42:06']]
+
+freeze_time = '2017-07-16T08:21:00'
+
+discovery = {'': [(None, {})]}
+
+
+checks = {'': [(None,
+ {'update_time_levels': (9000000, 10000000)},
+ [(1, 'Update: failed', []),
+ (0, 'Last update: 2016/02/26 15:42:06', []),
+ (2, 'Age: 506 d (warn/crit at 104 d/116 d)', []),
+ (0, 'Security version: 456.180', [])])]}
diff --git a/tests/unit/checks/generictests/datasets/fireeye_content_update_failed.py
b/tests/unit/checks/generictests/datasets/fireeye_content_update_failed.py
new file mode 100644
index 0000000..7ee98ff
--- /dev/null
+++ b/tests/unit/checks/generictests/datasets/fireeye_content_update_failed.py
@@ -0,0 +1,19 @@
+# yapf: disable
+
+
+checkname = 'fireeye_content'
+
+
+info = [['456.180', '0', '2016/02/26 15:42:06']]
+
+freeze_time = '2017-07-16T08:21:00'
+
+discovery = {'': [(None, {})]}
+
+
+checks = {'': [(None,
+ {},
+ [(1, 'Update: failed', []),
+ (0, 'Last update: 2016/02/26 15:42:06', []),
+ (0, 'Age: 506 d', []),
+ (0, 'Security version: 456.180', [])])]}