summaryrefslogtreecommitdiffstats
path: root/plugins/t/check_ssh.t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/t/check_ssh.t')
-rw-r--r--plugins/t/check_ssh.t7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/t/check_ssh.t b/plugins/t/check_ssh.t
index 6b5e93b..3e1824d 100644
--- a/plugins/t/check_ssh.t
+++ b/plugins/t/check_ssh.t
@@ -92,19 +92,16 @@ SKIP {
92 cmp_ok($result->return_code, '==', 0, "Exit with return code 0 (OK)"); 92 cmp_ok($result->return_code, '==', 0, "Exit with return code 0 (OK)");
93 like($result->output, '/^SSH OK - /', "Status text if command returned none (OK)"); 93 like($result->output, '/^SSH OK - /', "Status text if command returned none (OK)");
94 94
95
96 $res = NPTest->testCmd( 95 $res = NPTest->testCmd(
97 "./check_ssh -H $host_nonresponsive -t 2" 96 "./check_ssh -H $host_nonresponsive -t 2"
98 ); 97 );
99 cmp_ok($result->return_code, '==', 2, "Exit with return code 0 (OK)"); 98 cmp_ok($result->return_code, '==', 2, "Exit with return code 2 (CRITICAL)");
100 like($result->output, '/^CRITICAL - Socket timeout after 2 seconds/', "Status text if command returned none (OK)"); 99 like($result->output, '/^CRITICAL - Socket timeout after 2 seconds/', "Status text if command returned none (OK)");
101 100
102
103
104 $res = NPTest->testCmd( 101 $res = NPTest->testCmd(
105 "./check_ssh -H $hostname_invalid -t 2" 102 "./check_ssh -H $hostname_invalid -t 2"
106 ); 103 );
107 cmp_ok($result->return_code, '==', 3, "Exit with return code 0 (OK)"); 104 cmp_ok($result->return_code, '==', 3, "Exit with return code 3 (UNKNOWN)");
108 like($result->output, '/^check_ssh: Invalid hostname/', "Status text if command returned none (OK)"); 105 like($result->output, '/^check_ssh: Invalid hostname/', "Status text if command returned none (OK)");
109 106
110} 107}