summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4aec8e2)
raw | patch | inline | side by side (parent: 4aec8e2)
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Fri, 31 Jul 2009 05:20:59 +0000 (01:20 -0400) | ||
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Fri, 31 Jul 2009 05:41:03 +0000 (01:41 -0400) |
plugins/t/check_snmp.t | patch | blob | history |
diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t
index cda12f47abcaaee2f46c7ba74a3cb6db6135f3a2..e0138e6b93ceb5a19174e8491b11859cd140dbb4 100644 (file)
--- a/plugins/t/check_snmp.t
+++ b/plugins/t/check_snmp.t
my $lower = $1 - 0.05;
my $higher = $1 + 0.05;
$res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o enterprises.ucdavis.laTable.laEntry.laLoad.3 -w $lower -c $higher");
- cmp_ok( $res->return_code, '==', 1, "Exit WARNING with fractionnal arcuments");
+ cmp_ok( $res->return_code, '==', 1, "Exit WARNING with fractionnal arguments");
$res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o system.sysUpTime.0,host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunIndex.1 -w ,:0 -c ,:2");
cmp_ok( $res->return_code, '==', 1, "Exit WARNING on 2nd threshold");
- like($res->output, '/^SNMP WARNING - Timeticks:\s\(\d+\)\s.*,\s.*\s\*1\*\s.*$/', "First OID returned as string, 2nd checked for thresholds");
+ like($res->output, '/^SNMP WARNING - Timeticks:\s\(\d+\)\s+(?:\d+ days?,\s+)?\d+:\d+:\d+\.\d+\s+\*1\*\s.*$/', "First OID returned as string, 2nd checked for thresholds");
$res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunIndex.1 -w '' -c ''");
cmp_ok( $res->return_code, '==', 0, "Empty thresholds doesn't crash");