aboutsummaryrefslogtreecommitdiff
path: root/plugins/t/check_udp.t
diff options
context:
space:
mode:
authorGravatar Ton Voon <tonvoon@users.sourceforge.net> 2006-07-28 22:44:11 +0000
committerGravatar Ton Voon <tonvoon@users.sourceforge.net> 2006-07-28 22:44:11 +0000
commit03d772cc0d0023748e0b13a7bbaa301b86032eb4 (patch)
treef517523159bba8d36985408553649ec924a7f93d /plugins/t/check_udp.t
parent8d5fcec7a3b956bfa309cb2ddf7249fbe69e35e5 (diff)
downloadmonitoring-plugins-03d772cc0d0023748e0b13a7bbaa301b86032eb4.tar.gz
check_udp.c deprecated and check_udp now linked to check_tcp. check_udp2 removed
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1459 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/t/check_udp.t')
-rw-r--r--plugins/t/check_udp.t12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/t/check_udp.t b/plugins/t/check_udp.t
index c22aeaf4..e8a1e394 100644
--- a/plugins/t/check_udp.t
+++ b/plugins/t/check_udp.t
@@ -13,19 +13,19 @@ my $res;
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: {
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 @@ SKIP: {
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");