summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2005-09-15 08:39:23 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2005-09-15 08:39:23 (GMT)
commit7ead062b8c34a91d12f5762a675c3a38629ceb36 (patch)
treeb97c1d956f4c7e74eced7f405e8e688d15ed9091 /plugins
parent79e5b12d89bfcf97095e3e2ae02a5a3d1a361dd8 (diff)
downloadmonitoring-plugins-7ead062b8c34a91d12f5762a675c3a38629ceb36.tar.gz
Added test to make sure hostname has to be specified
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1223 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/t/check_ping.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/t/check_ping.t b/plugins/t/check_ping.t
index 49c568a..0dba91b 100644
--- a/plugins/t/check_ping.t
+++ b/plugins/t/check_ping.t
@@ -11,7 +11,7 @@ use NPTest;
11 11
12use vars qw($tests); 12use vars qw($tests);
13 13
14BEGIN {$tests = 6; plan tests => $tests} 14BEGIN {$tests = 8; plan tests => $tests}
15 15
16my $successOutput = '/PING (ok|OK) - Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms/'; 16my $successOutput = '/PING (ok|OK) - Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms/';
17my $failureOutput = '/Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms/'; 17my $failureOutput = '/Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms/';
@@ -31,6 +31,7 @@ $t += checkCmd( "./check_ping $host_responsive 100 100 1000 1000 -p 1",
31$t += checkCmd( "./check_ping $host_responsive 0 0 0 0 -p 1", 2, $failureOutput ); 31$t += checkCmd( "./check_ping $host_responsive 0 0 0 0 -p 1", 2, $failureOutput );
32$t += checkCmd( "./check_ping $host_nonresponsive 0 0 0 0 -p 1 -to 1", 2 ); 32$t += checkCmd( "./check_ping $host_nonresponsive 0 0 0 0 -p 1 -to 1", 2 );
33$t += checkCmd( "./check_ping $hostname_invalid 0 0 0 0 -p 1 -to 1", 3 ); 33$t += checkCmd( "./check_ping $hostname_invalid 0 0 0 0 -p 1 -to 1", 3 );
34$t += checkCmd( "./check_ping -w 100,10% -c 200,20%" , 3 , "/You must specify a server address or host name.*/");
34 35
35exit(0) if defined($Test::Harness::VERSION); 36exit(0) if defined($Test::Harness::VERSION);
36exit($tests - $t); 37exit($tests - $t);