From 24242f6ab75adb2de617921e79fe6bece4b75612 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Mon, 25 Jun 2012 12:32:01 +0200 Subject: check_http: added test for warning thresholds fixed typo in sslutils --- plugins/t/check_http.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/t/check_http.t') 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" ); -- cgit v1.2.3