Module: check_mk
Branch: master
Commit: 340bd0d58651f8af35eacc678c0481c98076adc0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=340bd0d58651f8…
Author: Óscar Nájera <on(a)mathias-kettner.de>
Date: Wed Mar 13 11:27:23 2019 +0100
Fix integration test for non-existent rrd column after memory leak fix
Change-Id: Ied0b65824aa1b483bc35e1398820e791e6ea840c
---
tests/integration/cmk_base/test_services_prediction.py | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/tests/integration/cmk_base/test_services_prediction.py b/tests/integration/cmk_base/test_services_prediction.py
index 126051a..9bad75c 100644
--- a/tests/integration/cmk_base/test_services_prediction.py
+++ b/tests/integration/cmk_base/test_services_prediction.py
@@ -135,10 +135,5 @@ def test_get_rrd_data_fails(cfg_setup):
step, data = cmk.utils.prediction.get_rrd_data(
'test-prediction', 'CPU load', 'untracked_prefdata', 'MAX', from_time, until_time)
- # The worst resolution in an rrd file is 6 hours, because query always
- # replies. step is a huge number which meaning I don't understand but
- # is not constant and is not the timestamp. Thus only test is higher
- # that worst resolution, and that no data comes out.
-
- assert step > 3600 * 6
+ assert step == 0
assert data == []
Module: check_mk
Branch: master
Commit: b0df4287f0749703ca9a2aec68c0d2a365433ca3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b0df4287f07497…
Author: Óscar Nájera <on(a)mathias-kettner.de>
Date: Wed Mar 13 12:06:19 2019 +0100
Fix assert of tuple, syntax warning
Change-Id: I748520dc6bc17eb8e70deb41a3878ecbf64574a1
---
tests/unit/cmk/special_agents/test_agent_kubernetes_nodes.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/unit/cmk/special_agents/test_agent_kubernetes_nodes.py b/tests/unit/cmk/special_agents/test_agent_kubernetes_nodes.py
index d260a26..33b64c1 100644
--- a/tests/unit/cmk/special_agents/test_agent_kubernetes_nodes.py
+++ b/tests/unit/cmk/special_agents/test_agent_kubernetes_nodes.py
@@ -26,8 +26,8 @@ def test_node_timestamps_utc():
]
stats = cluster_stats(node_names, stat_time_formatted)
utc_timestamp_average = 1550235205.3
- assert (stats['timestamp'] == pytest.approx(utc_timestamp_average),
- "The timestamp of a cluster has to be the average timestamp of its nodes")
+ assert stats['timestamp'] == pytest.approx(utc_timestamp_average),\
+ "The timestamp of a cluster has to be the average timestamp of its nodes"
def test_node_timestamps_non_utc():
@@ -39,5 +39,5 @@ def test_node_timestamps_non_utc():
]
stats = cluster_stats(node_names, stat_time_formatted)
utc_timestamp_average = 1551429894.7
- assert (stats['timestamp'] == pytest.approx(utc_timestamp_average),
- "The timestamp of a cluster has to be the average timestamp of its nodes")
+ assert stats['timestamp'] == pytest.approx(utc_timestamp_average),\
+ "The timestamp of a cluster has to be the average timestamp of its nodes"