[monitoring-plugins] Fix check_http test time output
Sven Nierlein
git at monitoring-plugins.org
Mon Nov 7 23:00:13 CET 2016
Module: monitoring-plugins
Branch: master
Commit: 2efad48e8ce2ab2fb6b777dbc64c337ed8d83cfe
Author: Peter (pir) Radcliffe <pir-gitweb.com at pir.net>
Committer: Sven Nierlein <sven at nierlein.de>
Date: Tue Nov 24 03:47:08 2015 +0000
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=2efad48
Fix check_http test time output
Tests need to match new output time and timezone.
---
plugins/tests/check_http.t | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t
index e72d243..727cc13 100755
--- a/plugins/tests/check_http.t
+++ b/plugins/tests/check_http.t
@@ -186,21 +186,21 @@ SKIP: {
$result = NPTest->testCmd( "$command -p $port_https -S -C 14" );
is( $result->return_code, 0, "$command -p $port_https -S -C 14" );
- is( $result->output, 'OK - Certificate \'Ton Voon\' will expire on Sun Mar 3 21:41:28 2019.', "output ok" );
+ is( $result->output, 'OK - Certificate \'Ton Voon\' will expire on 2019-03-03 21:41 +0000/UTC.', "output ok" );
$result = NPTest->testCmd( "$command -p $port_https -S -C 14000" );
is( $result->return_code, 1, "$command -p $port_https -S -C 14000" );
- like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:28 2019\)./', "output ok" );
+ like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(2019-03-03 21:41 +0000/UTC\)./', "output ok" );
# Expired cert tests
$result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" );
is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" );
- like( $result->output, '/CRITICAL - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:28 2019\)./', "output ok" );
+ like( $result->output, '/CRITICAL - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(2019-03-03 21:41 +0000/UTC\)./', "output ok" );
$result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" );
is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" );
is( $result->output,
- 'CRITICAL - Certificate \'Ton Voon\' expired on Thu Mar 5 00:13:16 2009.',
+ 'CRITICAL - Certificate \'Ton Voon\' expired on 2009-03-05 00:13 +0000/UTC.',
"output ok" );
}
More information about the Commits
mailing list