[monitoring-plugins] check_ssh.t: Fix a few typos

Lorenz Kästle git at monitoring-plugins.org
Fri Jan 14 15:40:12 CET 2022


    Module: monitoring-plugins
    Branch: dev/check_ssh-patches
    Commit: 4433c7554337b6bc54a3dc548b75746f9dbc2d86
    Author: Anton Lofgren <alofgren at op5.com>
 Committer: Lorenz Kästle <lorenz.kaestle at netways.de>
      Date: Fri Jan 30 10:33:47 2015 +0100
       URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=4433c75

check_ssh.t: Fix a few typos

Signed-off-by: Anton Lofgren <alofgren at op5.com>

---

 plugins/t/check_ssh.t | 7 ++-----
 1 file 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 {
 	cmp_ok($result->return_code, '==', 0, "Exit with return code 0 (OK)");
 	like($result->output, '/^SSH OK - /', "Status text if command returned none (OK)");
 
-
 	$res = NPTest->testCmd(
 	    "./check_ssh -H $host_nonresponsive -t 2"
 	    );
-	cmp_ok($result->return_code, '==', 2, "Exit with return code 0 (OK)");
+	cmp_ok($result->return_code, '==', 2, "Exit with return code 2 (CRITICAL)");
 	like($result->output, '/^CRITICAL - Socket timeout after 2 seconds/', "Status text if command returned none (OK)");
 
-
-
 	$res = NPTest->testCmd(
 	    "./check_ssh -H $hostname_invalid -t 2"
 	    );
-	cmp_ok($result->return_code, '==', 3, "Exit with return code 0 (OK)");
+	cmp_ok($result->return_code, '==', 3, "Exit with return code 3 (UNKNOWN)");
 	like($result->output, '/^check_ssh: Invalid hostname/', "Status text if command returned none (OK)");
 
 }



More information about the Commits mailing list