[Nagiosplug-checkins] nagiosplug/plugins/t check_udp.t,1.5,1.6
Ton Voon
tonvoon at users.sourceforge.net
Sat Jul 29 00:44:13 CEST 2006
Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15563/plugins/t
Modified Files:
check_udp.t
Log Message:
check_udp.c deprecated and check_udp now linked to check_tcp. check_udp2 removed
Index: check_udp.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_udp.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- check_udp.t 29 Mar 2006 14:37:58 -0000 1.5
+++ check_udp.t 28 Jul 2006 22:44:11 -0000 1.6
@@ -13,19 +13,19 @@
plan tests => 14;
-$res = NPTest->testCmd( "./check_udp2 -H localhost -p 3333" );
+$res = NPTest->testCmd( "./check_udp -H localhost -p 3333" );
cmp_ok( $res->return_code, '==', 3, "Need send/expect string");
like ( $res->output, '/With UDP checks, a send/expect string must be specified./', "Output OK");
-$res = NPTest->testCmd( "./check_udp2 -H localhost -p 3333 -s send" );
+$res = NPTest->testCmd( "./check_udp -H localhost -p 3333 -s send" );
cmp_ok( $res->return_code, '==', 3, "Need expect string");
like ( $res->output, '/With UDP checks, a send/expect string must be specified./', "Output OK");
-$res = NPTest->testCmd( "./check_udp2 -H localhost -p 3333 -e expect" );
+$res = NPTest->testCmd( "./check_udp -H localhost -p 3333 -e expect" );
cmp_ok( $res->return_code, '==', 3, "Need send string");
like ( $res->output, '/With UDP checks, a send/expect string must be specified./', "Output OK");
-$res = NPTest->testCmd( "./check_udp2 -H localhost -p 3333 -s foo -e bar" );
+$res = NPTest->testCmd( "./check_udp -H localhost -p 3333 -s foo -e bar" );
cmp_ok( $res->return_code, '==', 2, "Errors correctly because no udp service running" );
like ( $res->output, '/No data received from host/', "Output OK");
@@ -33,7 +33,7 @@
skip "No netcat available", 6 unless (system("which nc > /dev/null") == 0);
open (NC, "echo 'barbar' | nc -l -p 3333 -u |");
sleep 1;
- $res = NPTest->testCmd( "./check_udp2 -H localhost -p 3333 -s '' -e barbar -4" );
+ $res = NPTest->testCmd( "./check_udp -H localhost -p 3333 -s '' -e barbar -4" );
cmp_ok( $res->return_code, '==', 0, "Got barbar response back" );
like ( $res->output, '/\[barbar\]/', "Output OK");
close NC;
@@ -44,7 +44,7 @@
sleep 1; # Allow nc to startup
my $start = time;
- $res = NPTest->testCmd( "./check_udp2 -H localhost -p 3333 -s foofoo -e barbar -t 5 -4" );
+ $res = NPTest->testCmd( "./check_udp -H localhost -p 3333 -s foofoo -e barbar -t 5 -4" );
my $duration = time - $start;
cmp_ok( $res->return_code, '==', '2', "Hung waiting for response");
like ( $res->output, '/Socket timeout after 5 seconds/', "Timeout message");
More information about the Commits
mailing list