SF.net SVN: nagiosplug:[2232] nagiosplug/trunk/plugins/t/check_snmp.t

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
Revision: 2232
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2232&view=rev
Author:   dermoth
Date:     2009-07-31 05:42:33 +0000 (Fri, 31 Jul 2009)

Log Message:
-----------
Fix check_snmp Timetick test with <1 day uptime

From: Thomas Guyot-Sionnest <[email protected]>

Modified Paths:
--------------
    nagiosplug/trunk/plugins/t/check_snmp.t

Modified: nagiosplug/trunk/plugins/t/check_snmp.t
===================================================================
--- nagiosplug/trunk/plugins/t/check_snmp.t	2009-07-23 12:53:09 UTC (rev 2231)
+++ nagiosplug/trunk/plugins/t/check_snmp.t	2009-07-31 05:42:33 UTC (rev 2232)
@@ -95,11 +95,11 @@
 		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");


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.