[nagiosplug] tests/check_http.t: Fix whitespace issues

Nagios Plugin Development nagios-plugins at users.sourceforge.net
Fri Aug 10 14:40:23 CEST 2012


 Module: nagiosplug
 Branch: master
 Commit: 66003414af98e3bd2ee7a50e2bcaa28da9746dff
 Author: Holger Weiss <holger at zedat.fu-berlin.de>
   Date: Fri Aug 10 12:49:30 2012 +0200
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=6600341

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.

---

 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 0eb3f05..9f97abd 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 at 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 );
 
 }
-





More information about the Commits mailing list