aboutsummaryrefslogtreecommitdiff
path: root/plugins/t/check_http.t
diff options
context:
space:
mode:
authorGravatar Sven Nierlein <sven@nierlein.de> 2012-06-25 12:32:01 +0200
committerGravatar Sven Nierlein <sven@nierlein.de> 2012-06-25 12:53:47 +0200
commit24242f6ab75adb2de617921e79fe6bece4b75612 (patch)
treea2eedd5f2c21c8c152f855d20867b208bfa38ebc /plugins/t/check_http.t
parenteb2615a0bae70dc5ee5020b9d96d1ae7c95d1728 (diff)
downloadmonitoring-plugins-24242f6ab75adb2de617921e79fe6bece4b75612.tar.gz
check_http: added test for warning thresholds
fixed typo in sslutils
Diffstat (limited to 'plugins/t/check_http.t')
-rw-r--r--plugins/t/check_http.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t
index 55a5a530..0a25c775 100644
--- a/plugins/t/check_http.t
+++ b/plugins/t/check_http.t
@@ -8,7 +8,7 @@ use strict;
use Test::More;
use NPTest;
-plan tests => 26;
+plan tests => 28;
my $successOutput = '/OK.*HTTP.*second/';
@@ -105,6 +105,10 @@ SKIP: {
like ( $res->output, "/Certificate 'www.verisign.com' will expire on/", "Output OK" );
my $saved_cert_output = $res->output;
+ $res = NPTest->testCmd( "./check_http -C 8000,1 --ssl www.verisign.com" );
+ cmp_ok( $res->return_code, '==', 1, "Checking certificate for www.verisign.com");
+ like ( $res->output, qr/WARNING - Certificate 'www.verisign.com' expires in \d+ day/, "Output Warning" );
+
$res = NPTest->testCmd( "./check_http www.verisign.com -C 1" );
is( $res->return_code, 0, "Old syntax for cert checking okay" );
is( $res->output, $saved_cert_output, "Same output as new syntax" );