diff options
author | William Leibzon <william@leibzon.org> | 2012-06-25 09:05:28 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2012-06-25 10:54:15 (GMT) |
commit | 181260d636d94c55be2208f6353813cfa00b183a (patch) | |
tree | 25b79e19f227191e9b0e775cdcb3e86a452ec450 /plugins/tests | |
parent | 24242f6ab75adb2de617921e79fe6bece4b75612 (diff) | |
download | monitoring-plugins-181260d636d94c55be2208f6353813cfa00b183a.tar.gz |
added test case for certificate checs with both warning and critical values
Diffstat (limited to 'plugins/tests')
-rwxr-xr-x | plugins/tests/check_http.t | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t index 9ae6bbd..8337f52 100755 --- a/plugins/tests/check_http.t +++ b/plugins/tests/check_http.t | |||
@@ -188,6 +188,10 @@ SKIP: { | |||
188 | is( $result->return_code, 1, "$command -p $port_https -S -C 14000" ); | 188 | is( $result->return_code, 1, "$command -p $port_https -S -C 14000" ); |
189 | like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" ); | 189 | like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" ); |
190 | 190 | ||
191 | $result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" ); | ||
192 | is( $result->return_code, 1, "$command -p $port_https -S -C 139600,14000" ); | ||
193 | like( $result->output, '/CRITICAL - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" ); | ||
194 | |||
191 | # Expired cert tests | 195 | # Expired cert tests |
192 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); | 196 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); |
193 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); | 197 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); |