[Nagiosplug-checkins] nagiosplug/plugins/t check_http.t,1.12,1.13

Ton Voon tonvoon at users.sourceforge.net
Wed Dec 20 23:33:31 CET 2006


Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24818/plugins/t

Modified Files:
	check_http.t 
Log Message:
Removed unused timestamp variable (Matthias Eble)
Fixed redirection test. Added extra tests for funny syntax when checking
certificates, updated help for more common syntax


Index: check_http.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_http.t,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- check_http.t	19 Oct 2006 18:59:58 -0000	1.12
+++ check_http.t	20 Dec 2006 22:33:29 -0000	1.13
@@ -9,7 +9,7 @@
 use Test::More;
 use NPTest;
 
-plan tests => 22;
+plan tests => 26;
 
 my $successOutput = '/OK.*HTTP.*second/';
 
@@ -68,6 +68,14 @@
 like  ( $res->output, '/Certificate will expire on/', "Output OK" );
 my $saved_cert_output = $res->output;
 
+$res = NPTest->testCmd( "./check_http www.verisign.com -C 1" );
+is( $res->return_code, 0, "Old syntax for cert checking okay" );
+is( $res->output, $saved_cert_output, "Same output as new syntax" );
+
+$res = NPTest->testCmd( "./check_http -H www.verisign.com -C 1" );
+is( $res->return_code, 0, "Updated syntax for cert checking okay" );
+is( $res->output, $saved_cert_output, "Same output as new syntax" );
+
 $res = NPTest->testCmd( "./check_http -C 1 www.verisign.com" );
 cmp_ok( $res->output, 'eq', $saved_cert_output, "--ssl option automatically added");
 
@@ -96,6 +104,6 @@
 $res = NPTest->testCmd( "./check_http -H altinity.com -r 'nAGiOs' --invert-regex" );
 cmp_ok( $res->return_code, "==", 0, "And also when not found");
 
-$res = NPTest->testCmd( "./check_http -H www.worldfirefoxday.com -f follow" );
+$res = NPTest->testCmd( "./check_http -H www.mozilla.com -u /firefox -f follow" );
 is( $res->return_code, 0, "Redirection based on location is okay");
 





More information about the Commits mailing list