diff options
-rw-r--r-- | plugins/t/check_ftp.t | 2 | ||||
-rw-r--r-- | plugins/t/check_imap.t | 2 | ||||
-rw-r--r-- | plugins/t/check_jabber.t | 4 | ||||
-rw-r--r-- | plugins/t/check_pop.t | 2 | ||||
-rw-r--r-- | plugins/t/check_tcp.t | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/plugins/t/check_ftp.t b/plugins/t/check_ftp.t index 7d7cc68c..47a73e13 100644 --- a/plugins/t/check_ftp.t +++ b/plugins/t/check_ftp.t | |||
@@ -27,7 +27,7 @@ my $t; | |||
27 | 27 | ||
28 | $t += checkCmd( "./check_ftp $host_tcp_ftp -wt 300 -ct 600", 0, $successOutput ); | 28 | $t += checkCmd( "./check_ftp $host_tcp_ftp -wt 300 -ct 600", 0, $successOutput ); |
29 | $t += checkCmd( "./check_ftp $host_nonresponsive -wt 0 -ct 0 -to 1", 2 ); | 29 | $t += checkCmd( "./check_ftp $host_nonresponsive -wt 0 -ct 0 -to 1", 2 ); |
30 | $t += checkCmd( "./check_ftp $hostname_invalid -wt 0 -ct 0", 3 ); | 30 | $t += checkCmd( "./check_ftp $hostname_invalid -wt 0 -ct 0", 2 ); |
31 | 31 | ||
32 | exit(0) if defined($Test::Harness::VERSION); | 32 | exit(0) if defined($Test::Harness::VERSION); |
33 | exit($tests - $t); | 33 | exit($tests - $t); |
diff --git a/plugins/t/check_imap.t b/plugins/t/check_imap.t index 29343025..fa957d1b 100644 --- a/plugins/t/check_imap.t +++ b/plugins/t/check_imap.t | |||
@@ -36,7 +36,7 @@ $t = NPTest->testCmd( "./check_imap $host_nonresponsive" ); | |||
36 | cmp_ok( $t->return_code, '==', 2, "Get error with non reponsive host" ); | 36 | cmp_ok( $t->return_code, '==', 2, "Get error with non reponsive host" ); |
37 | 37 | ||
38 | $t = NPTest->testCmd( "./check_imap $hostname_invalid" ); | 38 | $t = NPTest->testCmd( "./check_imap $hostname_invalid" ); |
39 | cmp_ok( $t->return_code, '==', 3, "Invalid hostname" ); | 39 | cmp_ok( $t->return_code, '==', 2, "Invalid hostname" ); |
40 | 40 | ||
41 | $t = NPTest->testCmd( "./check_imap -H $host_tcp_imap -e unlikely_string"); | 41 | $t = NPTest->testCmd( "./check_imap -H $host_tcp_imap -e unlikely_string"); |
42 | cmp_ok( $t->return_code, '==', 1, "Got warning with bad response" ); | 42 | 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 b6193214..6a3d4ef7 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/'; | |||
34 | 34 | ||
35 | my $jabberUnresponsive = '/CRITICAL\s-\sSocket timeout after\s\d+\sseconds/'; | 35 | my $jabberUnresponsive = '/CRITICAL\s-\sSocket timeout after\s\d+\sseconds/'; |
36 | 36 | ||
37 | my $jabberInvalid = '/JABBER UNKNOWN - Invalid hostname, address or socket:\s.+/'; | 37 | my $jabberInvalid = '/JABBER CRITICAL - Invalid hostname, address or socket:\s.+/'; |
38 | 38 | ||
39 | my $r; | 39 | my $r; |
40 | 40 | ||
@@ -60,6 +60,6 @@ is( $r->return_code, 2, "Unresponsive host gives critical" ); | |||
60 | like( $r->output, $jabberUnresponsive ); | 60 | like( $r->output, $jabberUnresponsive ); |
61 | 61 | ||
62 | $r = NPTest->testCmd( "./check_jabber $hostname_invalid" ); | 62 | $r = NPTest->testCmd( "./check_jabber $hostname_invalid" ); |
63 | is( $r->return_code, 3, "Invalid hostname gives critical" ); | 63 | is( $r->return_code, 2, "Invalid hostname gives critical" ); |
64 | like( $r->output, $jabberInvalid ); | 64 | like( $r->output, $jabberInvalid ); |
65 | 65 | ||
diff --git a/plugins/t/check_pop.t b/plugins/t/check_pop.t index 565a5771..b78291da 100644 --- a/plugins/t/check_pop.t +++ b/plugins/t/check_pop.t | |||
@@ -53,4 +53,4 @@ $res = NPTest->testCmd( "./check_pop $host_nonresponsive" ); | |||
53 | cmp_ok( $res->return_code, '==', 2, "Non responsive host"); | 53 | cmp_ok( $res->return_code, '==', 2, "Non responsive host"); |
54 | 54 | ||
55 | $res = NPTest->testCmd( "./check_pop $hostname_invalid" ); | 55 | $res = NPTest->testCmd( "./check_pop $hostname_invalid" ); |
56 | cmp_ok( $res->return_code, '==', 3, "Invalid host"); | 56 | cmp_ok( $res->return_code, '==', 2, "Invalid host"); |
diff --git a/plugins/t/check_tcp.t b/plugins/t/check_tcp.t index 83414d90..2914350e 100644 --- a/plugins/t/check_tcp.t +++ b/plugins/t/check_tcp.t | |||
@@ -30,7 +30,7 @@ my $t; | |||
30 | $t += checkCmd( "./check_tcp $host_tcp_http -p 80 -wt 300 -ct 600", 0, $successOutput ); | 30 | $t += checkCmd( "./check_tcp $host_tcp_http -p 80 -wt 300 -ct 600", 0, $successOutput ); |
31 | $t += checkCmd( "./check_tcp $host_tcp_http -p 81 -wt 0 -ct 0 -to 1", 2 ); # use invalid port for this test | 31 | $t += checkCmd( "./check_tcp $host_tcp_http -p 81 -wt 0 -ct 0 -to 1", 2 ); # use invalid port for this test |
32 | $t += checkCmd( "./check_tcp $host_nonresponsive -p 80 -wt 0 -ct 0 -to 1", 2 ); | 32 | $t += checkCmd( "./check_tcp $host_nonresponsive -p 80 -wt 0 -ct 0 -to 1", 2 ); |
33 | $t += checkCmd( "./check_tcp $hostname_invalid -p 80 -wt 0 -ct 0 -to 1", 3 ); | 33 | $t += checkCmd( "./check_tcp $hostname_invalid -p 80 -wt 0 -ct 0 -to 1", 2 ); |
34 | 34 | ||
35 | # Need the \r\n to make it more standards compliant with web servers. Need the various quotes | 35 | # Need the \r\n to make it more standards compliant with web servers. Need the various quotes |
36 | # so that perl doesn't interpret the \r\n and is passed onto command line correctly | 36 | # so that perl doesn't interpret the \r\n and is passed onto command line correctly |