[nagiosplug] added test case for certificate checs with both ...
"Nagios Plugin Development" <[email protected]> Mon, 25 Jun 2012 11:01:13 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug
Branch: master
Commit: 181260d636d94c55be2208f6353813cfa00b183a
Author: William Leibzon <[email protected]>
Committer: Sven Nierlein <[email protected]>
Date: Mon Jun 25 02:05:28 2012 -0700
URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=181260d
added test case for certificate checs with both warning and critical values
---
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: {
is( $result->return_code, 1, "$command -p $port_https -S -C 14000" );
like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" );
+ $result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" );
+ is( $result->return_code, 1, "$command -p $port_https -S -C 139600,14000" );
+ like( $result->output, '/CRITICAL - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" );
+
# Expired cert tests
$result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" );
is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" );
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/