diff options
Diffstat (limited to 'plugins/tests')
-rwxr-xr-x | plugins/tests/check_http.t | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t index e72d243..1bc0ecb 100755 --- a/plugins/tests/check_http.t +++ b/plugins/tests/check_http.t | |||
@@ -17,6 +17,8 @@ use Test::More; | |||
17 | use NPTest; | 17 | use NPTest; |
18 | use FindBin qw($Bin); | 18 | use FindBin qw($Bin); |
19 | 19 | ||
20 | $ENV{'LC_TIME'} = "C"; | ||
21 | |||
20 | my $common_tests = 70; | 22 | my $common_tests = 70; |
21 | my $ssl_only_tests = 8; | 23 | my $ssl_only_tests = 8; |
22 | # Check that all dependent modules are available | 24 | # Check that all dependent modules are available |
@@ -186,21 +188,21 @@ SKIP: { | |||
186 | 188 | ||
187 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14" ); | 189 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14" ); |
188 | is( $result->return_code, 0, "$command -p $port_https -S -C 14" ); | 190 | is( $result->return_code, 0, "$command -p $port_https -S -C 14" ); |
189 | is( $result->output, 'OK - Certificate \'Ton Voon\' will expire on Sun Mar 3 21:41:28 2019.', "output ok" ); | 191 | is( $result->output, 'OK - Certificate \'Ton Voon\' will expire on Sun Mar 3 21:41:28 2019 +0000.', "output ok" ); |
190 | 192 | ||
191 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14000" ); | 193 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14000" ); |
192 | is( $result->return_code, 1, "$command -p $port_https -S -C 14000" ); | 194 | is( $result->return_code, 1, "$command -p $port_https -S -C 14000" ); |
193 | like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:28 2019\)./', "output ok" ); | 195 | like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:28 2019 \+0000\)./', "output ok" ); |
194 | 196 | ||
195 | # Expired cert tests | 197 | # Expired cert tests |
196 | $result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" ); | 198 | $result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" ); |
197 | is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" ); | 199 | is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" ); |
198 | like( $result->output, '/CRITICAL - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:28 2019\)./', "output ok" ); | 200 | like( $result->output, '/CRITICAL - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:28 2019 \+0000\)./', "output ok" ); |
199 | 201 | ||
200 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); | 202 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); |
201 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); | 203 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); |
202 | is( $result->output, | 204 | is( $result->output, |
203 | 'CRITICAL - Certificate \'Ton Voon\' expired on Thu Mar 5 00:13:16 2009.', | 205 | 'CRITICAL - Certificate \'Ton Voon\' expired on Thu Mar 5 00:13:16 2009 +0000.', |
204 | "output ok" ); | 206 | "output ok" ); |
205 | 207 | ||
206 | } | 208 | } |