[Nagiosplug-checkins] nagiosplug/plugins/t check_ping.t,1.2,1.3

Ton Voon tonvoon at users.sourceforge.net
Thu Sep 15 01:40:24 CEST 2005


Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv831/t

Modified Files:
	check_ping.t 
Log Message:
Added test to make sure hostname has to be specified


Index: check_ping.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_ping.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- check_ping.t	25 Jul 2005 01:47:14 -0000	1.2
+++ check_ping.t	15 Sep 2005 08:39:23 -0000	1.3
@@ -11,7 +11,7 @@
 
 use vars qw($tests);
 
-BEGIN {$tests = 6; plan tests => $tests}
+BEGIN {$tests = 8; plan tests => $tests}
 
 my $successOutput = '/PING (ok|OK) - Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms/';
 my $failureOutput = '/Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms/';
@@ -31,6 +31,7 @@
 $t += checkCmd( "./check_ping $host_responsive      0   0    0    0 -p 1",       2, $failureOutput );
 $t += checkCmd( "./check_ping $host_nonresponsive   0   0    0    0 -p 1 -to 1", 2 );
 $t += checkCmd( "./check_ping $hostname_invalid     0   0    0    0 -p 1 -to 1", 3 );
+$t += checkCmd( "./check_ping -w 100,10% -c 200,20%"                           , 3 , "/You must specify a server address or host name.*/");
 
 exit(0) if defined($Test::Harness::VERSION);
 exit($tests - $t);





More information about the Commits mailing list