Преглед изворни кода

more r1879 fixes

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1899 f882894a-f735-0410-b71e-b25c423dba1c
Thomas Guyot-Sionnest пре 18 година
родитељ
комит
2e0da16fad
3 измењених фајлова са 4 додато и 4 уклоњено
  1. 1 1
      plugins/t/check_imap.t
  2. 2 2
      plugins/t/check_jabber.t
  3. 1 1
      plugins/t/check_pop.t

+ 1 - 1
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" );
 cmp_ok( $t->return_code, '==', 2, "Get error with non reponsive host" );
 
 
 $t = NPTest->testCmd( "./check_imap $hostname_invalid" );
 $t = NPTest->testCmd( "./check_imap $hostname_invalid" );
-cmp_ok( $t->return_code, '==', 2, "Invalid hostname" );
+cmp_ok( $t->return_code, '==', 3, "Invalid hostname" );
 
 
 $t = NPTest->testCmd( "./check_imap -H $host_tcp_imap -e unlikely_string");
 $t = NPTest->testCmd( "./check_imap -H $host_tcp_imap -e unlikely_string");
 cmp_ok( $t->return_code, '==', 1, "Got warning with bad response" );
 cmp_ok( $t->return_code, '==', 1, "Got warning with bad response" );

+ 2 - 2
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 $jabberUnresponsive = '/CRITICAL\s-\sSocket timeout after\s\d+\sseconds/';
 
 
-my $jabberInvalid = '/JABBER CRITICAL - Invalid hostname, address or socket:\s.+/';
+my $jabberInvalid = '/JABBER UNKNOWN - Invalid hostname, address or socket:\s.+/';
 
 
 my $r;
 my $r;
 
 
@@ -60,6 +60,6 @@ is( $r->return_code, 2, "Unresponsive host gives critical" );
 like( $r->output, $jabberUnresponsive );
 like( $r->output, $jabberUnresponsive );
 
 
 $r = NPTest->testCmd( "./check_jabber $hostname_invalid" );
 $r = NPTest->testCmd( "./check_jabber $hostname_invalid" );
-is( $r->return_code, 2, "Invalid hostname gives critical" );
+is( $r->return_code, 3, "Invalid hostname gives critical" );
 like( $r->output, $jabberInvalid );
 like( $r->output, $jabberInvalid );
 
 

+ 1 - 1
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");
 cmp_ok( $res->return_code, '==', 2, "Non responsive host");
 
 
 $res = NPTest->testCmd( "./check_pop $hostname_invalid" );
 $res = NPTest->testCmd( "./check_pop $hostname_invalid" );
-cmp_ok( $res->return_code, '==', 2, "Invalid host");
+cmp_ok( $res->return_code, '==', 3, "Invalid host");