From 3120fe3806ac2df69be10097b71ec84974bbcea7 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Tue, 8 Jan 2008 11:57:24 +0000 Subject: Reverted commits 1898 and 1899 due to reversion of 1879 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1901 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/plugins/t/check_ftp.t b/plugins/t/check_ftp.t index 7d7cc68..47a73e1 100644 --- a/plugins/t/check_ftp.t +++ b/plugins/t/check_ftp.t @@ -27,7 +27,7 @@ my $t; $t += checkCmd( "./check_ftp $host_tcp_ftp -wt 300 -ct 600", 0, $successOutput ); $t += checkCmd( "./check_ftp $host_nonresponsive -wt 0 -ct 0 -to 1", 2 ); -$t += checkCmd( "./check_ftp $hostname_invalid -wt 0 -ct 0", 3 ); +$t += checkCmd( "./check_ftp $hostname_invalid -wt 0 -ct 0", 2 ); exit(0) if defined($Test::Harness::VERSION); exit($tests - $t); diff --git a/plugins/t/check_imap.t b/plugins/t/check_imap.t index 2934302..fa957d1 100644 --- a/plugins/t/check_imap.t +++ b/plugins/t/check_imap.t @@ -36,7 +36,7 @@ $t = NPTest->testCmd( "./check_imap $host_nonresponsive" ); cmp_ok( $t->return_code, '==', 2, "Get error with non reponsive host" ); $t = NPTest->testCmd( "./check_imap $hostname_invalid" ); -cmp_ok( $t->return_code, '==', 3, "Invalid hostname" ); +cmp_ok( $t->return_code, '==', 2, "Invalid hostname" ); $t = NPTest->testCmd( "./check_imap -H $host_tcp_imap -e unlikely_string"); cmp_ok( $t->return_code, '==', 1, "Got warning with bad response" ); diff --git a/plugins/t/check_jabber.t b/plugins/t/check_jabber.t index b619321..6a3d4ef 100644 --- a/plugins/t/check_jabber.t +++ b/plugins/t/check_jabber.t @@ -34,7 +34,7 @@ my $jabberOK = '/JABBER OK\s-\s\d+\.\d+\ssecond response time on port 5222/'; my $jabberUnresponsive = '/CRITICAL\s-\sSocket timeout after\s\d+\sseconds/'; -my $jabberInvalid = '/JABBER UNKNOWN - Invalid hostname, address or socket:\s.+/'; +my $jabberInvalid = '/JABBER CRITICAL - Invalid hostname, address or socket:\s.+/'; my $r; @@ -60,6 +60,6 @@ is( $r->return_code, 2, "Unresponsive host gives critical" ); like( $r->output, $jabberUnresponsive ); $r = NPTest->testCmd( "./check_jabber $hostname_invalid" ); -is( $r->return_code, 3, "Invalid hostname gives critical" ); +is( $r->return_code, 2, "Invalid hostname gives critical" ); like( $r->output, $jabberInvalid ); diff --git a/plugins/t/check_pop.t b/plugins/t/check_pop.t index 565a577..b78291d 100644 --- a/plugins/t/check_pop.t +++ b/plugins/t/check_pop.t @@ -53,4 +53,4 @@ $res = NPTest->testCmd( "./check_pop $host_nonresponsive" ); cmp_ok( $res->return_code, '==', 2, "Non responsive host"); $res = NPTest->testCmd( "./check_pop $hostname_invalid" ); -cmp_ok( $res->return_code, '==', 3, "Invalid host"); +cmp_ok( $res->return_code, '==', 2, "Invalid host"); diff --git a/plugins/t/check_tcp.t b/plugins/t/check_tcp.t index 83414d9..2914350 100644 --- a/plugins/t/check_tcp.t +++ b/plugins/t/check_tcp.t @@ -30,7 +30,7 @@ my $t; $t += checkCmd( "./check_tcp $host_tcp_http -p 80 -wt 300 -ct 600", 0, $successOutput ); $t += checkCmd( "./check_tcp $host_tcp_http -p 81 -wt 0 -ct 0 -to 1", 2 ); # use invalid port for this test $t += checkCmd( "./check_tcp $host_nonresponsive -p 80 -wt 0 -ct 0 -to 1", 2 ); -$t += checkCmd( "./check_tcp $hostname_invalid -p 80 -wt 0 -ct 0 -to 1", 3 ); +$t += checkCmd( "./check_tcp $hostname_invalid -p 80 -wt 0 -ct 0 -to 1", 2 ); # Need the \r\n to make it more standards compliant with web servers. Need the various quotes # so that perl doesn't interpret the \r\n and is passed onto command line correctly -- cgit v0.10-9-g596f