Module: check_mk
Branch: master
Commit: 0bd6847acd58f62614f9b6f3b00de2fe53e66f4c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0bd6847acd58f6…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Dec 18 16:46:26 2017 +0100
test_statgrab_cpu_check: Improve test data
Change-Id: I6e0d65b29d08f679a558bd458fd3f1fea981cf37
---
tests/checks/test_statgrab_cpu_check.py | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/tests/checks/test_statgrab_cpu_check.py
b/tests/checks/test_statgrab_cpu_check.py
index ed41637..1e4026d 100644
--- a/tests/checks/test_statgrab_cpu_check.py
+++ b/tests/checks/test_statgrab_cpu_check.py
@@ -6,22 +6,17 @@ import checktestlib
pytestmark = pytest.mark.checks
+info_statgrab_cpu_hpux = lambda t: [[u'idle', u'%d' % int(t*5)],
+ [u'iowait', u'%d' % int(t*10)],
+ [u'kernel', u'%d' % int(t*10)],
+ [u'nice', u'%d' % int(t*20)],
+ [u'swap', u'0'],
+ [u'systime', u'%d' % int(t*25)],
+ [u'total', u'%d' % int(t*100)],
+ [u'user', u'%d' % int(t*30)]]
+
@pytest.mark.parametrize("time_to_info,params,expected_result", [
-(lambda t: [[u'ctxsw', u'%d' % int(t*50)],
- [u'idle', u'%d' % int(t*50)],
- [u'intrs', u'%d' % int(t*50)],
- [u'iowait', u'%d' % int(t*50)],
- [u'kernel', u'%d' % int(t*50)],
- [u'nice', u'%d' % int(t*50)],
- [u'nvctxsw', u'%d' % int(t*50)],
- [u'softintrs', u'%d' % int(t*50)],
- [u'swap', u'%d' % int(t*50)],
- [u'syscalls', u'%d' % int(t*50)],
- [u'systime', u'%d' % int(t*50)],
- [u'total', u'%d' % int(t*50)],
- [u'user', u'%d' % int(t*50)],
- [u'vctxsw', u'%d' % int(t*50)]],
- {}, {}),
+(info_statgrab_cpu_hpux, {}, {}),
])
def test_statgrab_cpu_check(check_manager, monkeypatch, time_to_info, params,
expected_result):
import time