diff options
Diffstat (limited to 'plugins/t/check_http.t')
-rw-r--r-- | plugins/t/check_http.t | 6 |
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; | |||
8 | use Test::More; | 8 | use Test::More; |
9 | use NPTest; | 9 | use NPTest; |
10 | 10 | ||
11 | plan tests => 26; | 11 | plan tests => 28; |
12 | 12 | ||
13 | my $successOutput = '/OK.*HTTP.*second/'; | 13 | my $successOutput = '/OK.*HTTP.*second/'; |
14 | 14 | ||
@@ -105,6 +105,10 @@ SKIP: { | |||
105 | like ( $res->output, "/Certificate 'www.verisign.com' will expire on/", "Output OK" ); | 105 | like ( $res->output, "/Certificate 'www.verisign.com' will expire on/", "Output OK" ); |
106 | my $saved_cert_output = $res->output; | 106 | my $saved_cert_output = $res->output; |
107 | 107 | ||
108 | $res = NPTest->testCmd( "./check_http -C 8000,1 --ssl www.verisign.com" ); | ||
109 | cmp_ok( $res->return_code, '==', 1, "Checking certificate for www.verisign.com"); | ||
110 | like ( $res->output, qr/WARNING - Certificate 'www.verisign.com' expires in \d+ day/, "Output Warning" ); | ||
111 | |||
108 | $res = NPTest->testCmd( "./check_http www.verisign.com -C 1" ); | 112 | $res = NPTest->testCmd( "./check_http www.verisign.com -C 1" ); |
109 | is( $res->return_code, 0, "Old syntax for cert checking okay" ); | 113 | is( $res->return_code, 0, "Old syntax for cert checking okay" ); |
110 | is( $res->output, $saved_cert_output, "Same output as new syntax" ); | 114 | is( $res->output, $saved_cert_output, "Same output as new syntax" ); |