diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2012-08-10 12:49:30 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2012-08-10 12:49:30 +0200 |
commit | 66003414af98e3bd2ee7a50e2bcaa28da9746dff (patch) | |
tree | ef0215fb49af8f0862d4b57a9499b11c068b5a2b /plugins/tests | |
parent | 3f944a50b78b662e44efb585d0da08b8333e4c7b (diff) | |
download | monitoring-plugins-66003414af98e3bd2ee7a50e2bcaa28da9746dff.tar.gz |
tests/check_http.t: Fix whitespace issues
In tests/check_http.t, tabs are used for indentation.
While at it, apply another few cosmetic changes.
Diffstat (limited to 'plugins/tests')
-rwxr-xr-x | plugins/tests/check_http.t | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t index 0eb3f05b..9f97abdc 100755 --- a/plugins/tests/check_http.t +++ b/plugins/tests/check_http.t @@ -12,7 +12,6 @@ # Common Name (eg, YOUR name) []:Ton Voon # Email Address []:tonvoon@mac.com - use strict; use Test::More; use NPTest; @@ -160,9 +159,9 @@ sub run_server { } } -END { +END { foreach my $pid (@pids) { - if ($pid) { print "Killing $pid\n"; kill "INT", $pid } + if ($pid) { print "Killing $pid\n"; kill "INT", $pid } } }; @@ -179,7 +178,7 @@ run_common_tests( { command => "$command -p $port_http" } ); SKIP: { skip "HTTP::Daemon::SSL not installed", $common_tests + $ssl_only_tests if ! exists $servers->{https}; run_common_tests( { command => "$command -p $port_https", ssl => 1 } ); - + $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 03/03/2019 21:41.', "output ok" ); @@ -188,14 +187,14 @@ 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, 2, "$command -p $port_https -S -C 13960,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 -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\) \(03/03/2019 21:41\)./', "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, + is( $result->output, 'CRITICAL - Certificate \'Ton Voon\' expired on 03/05/2009 00:13.', "output ok" ); @@ -406,4 +405,3 @@ sub run_common_tests { isnt( $@, "alarm\n", $cmd ); } - |