From e0be2e6094a54771a7a310eea5853d2e05edf480 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Fri, 31 Jul 2009 01:20:59 -0400 Subject: Fix check_snmp Timetick test with <1 day uptime --- plugins/t/check_snmp.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/t/check_snmp.t b/plugins/t/check_snmp.t index cda12f47..e0138e6b 100644 --- a/plugins/t/check_snmp.t +++ b/plugins/t/check_snmp.t @@ -95,11 +95,11 @@ SKIP: { 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"); -- cgit v1.2.3