summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2016-11-07 21:46:06 (GMT)
committerSven Nierlein <sven@nierlein.de>2016-11-07 21:46:06 (GMT)
commit948db2e3a2f97eaed7fbd268f2cdd2c6beb0288b (patch)
treed8a6e9f0e0d0ac78fe4558173fd55d7d6ee4dcb1 /plugins
parent2f2b2f1987d63cb4b31b2ef4c95cf8c8ab1d83c6 (diff)
downloadmonitoring-plugins-948db2e3a2f97eaed7fbd268f2cdd2c6beb0288b.tar.gz
tests: adjust check_http to new output format
Signed-off-by: Sven Nierlein <sven@nierlein.de>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/t/check_http.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t
index 2b906e3..f514ca6 100644
--- a/plugins/t/check_http.t
+++ b/plugins/t/check_http.t
@@ -121,9 +121,9 @@ SKIP: {
121 $res = NPTest->testCmd("LC_TIME=C TZ=UTC ./check_http -C 1 www.verisign.com"); 121 $res = NPTest->testCmd("LC_TIME=C TZ=UTC ./check_http -C 1 www.verisign.com");
122 like($res->output, qr/OK - Certificate 'www.verisign.com' will expire on/, "Catch cert output"); 122 like($res->output, qr/OK - Certificate 'www.verisign.com' will expire on/, "Catch cert output");
123 is( $res->return_code, 0, "Catch cert output exit code" ); 123 is( $res->return_code, 0, "Catch cert output exit code" );
124 my($mon,$day,$hour,$min,$sec,$year) = ($res->output =~ /(\w+)\s+(\d+)\s+(\d+):(\d+):(\d+)\s+(\d+)\./); 124 my($mon,$day,$hour,$min,$sec,$year) = ($res->output =~ /(\w+)\s+(\d+)\s+(\d+):(\d+):(\d+)\s+(\d+)/);
125 if(!defined $year) { 125 if(!defined $year) {
126 die("parsing date failed from: ".$res); 126 die("parsing date failed from: ".$res->output);
127 } 127 }
128 my $months = {'Jan' => 0, 'Feb' => 1, 'Mar' => 2, 'Apr' => 3, 'May' => 4, 'Jun' => 5, 'Jul' => 6, 'Aug' => 7, 'Sep' => 8, 'Oct' => 9, 'Nov' => 10, 'Dec' => 11}; 128 my $months = {'Jan' => 0, 'Feb' => 1, 'Mar' => 2, 'Apr' => 3, 'May' => 4, 'Jun' => 5, 'Jul' => 6, 'Aug' => 7, 'Sep' => 8, 'Oct' => 9, 'Nov' => 10, 'Dec' => 11};
129 my $ts = mktime($sec, $min, $hour, $day, $months->{$mon}, $year-1900); 129 my $ts = mktime($sec, $min, $hour, $day, $months->{$mon}, $year-1900);