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

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
Revision: 2172
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2172&view=rev
Author:   dermoth
Date:     2009-03-18 07:54:34 +0000 (Wed, 18 Mar 2009)

Log Message:
-----------
Add suggested multi-oid test (John A. Barbuto)

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-03-18 07:54:15 UTC (rev 2171)
+++ nagiosplug/trunk/plugins/t/check_snmp.t	2009-03-18 07:54:34 UTC (rev 2172)
@@ -8,7 +8,7 @@
 use Test::More;
 use NPTest;
 
-my $tests = 32;
+my $tests = 34;
 plan tests => $tests;
 my $res;
 
@@ -81,6 +81,10 @@
 		like($res->output, "/^SNMP CRITICAL - 2 *1*/", "Got two values back" );
 		like( $res->perf_output, "/ifIndex.2=2/", "Got 1st perf data" );
 		like( $res->perf_output, "/ifIndex.1=1/", "Got 2nd perf data" );
+
+		$res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o host.hrStorage.hrMemorySize.0,host.hrSystem.hrSystemProcesses.0 -w 1:,1: -c 1:,1:");
+		cmp_ok( $res->return_code, '==', 0, "Exit OK when querying hrMemorySize and hrSystemProcesses");
+		like($res->output, '/^SNMP OK - \d+ \d+/', "String contains hrMemorySize and hrSystemProcesses");
 	}
 
 	SKIP: {


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

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
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.