[Nagiosplug-checkins] nagiosplug/plugins/t check_tcp.t,1.4,1.5

Ton Voon tonvoon at users.sourceforge.net
Wed Feb 14 11:11:09 CET 2007


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

Modified Files:
	check_tcp.t 
Log Message:
Documentation fix re: --escape flag. Fix of ./check_tcp test to webservers
to make it more standards compliant


Index: check_tcp.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_tcp.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- check_tcp.t	30 Jan 2007 05:01:00 -0000	1.4
+++ check_tcp.t	14 Feb 2007 10:11:07 -0000	1.5
@@ -31,7 +31,10 @@
 $t += checkCmd( "./check_tcp $host_tcp_http      -p 81 -wt   0 -ct   0 -to 1", 2 ); # use invalid port for this test
 $t += checkCmd( "./check_tcp $host_nonresponsive -p 80 -wt   0 -ct   0 -to 1", 2 );
 $t += checkCmd( "./check_tcp $hostname_invalid   -p 80 -wt   0 -ct   0 -to 1", 2 );
-$t += checkCmd( "./check_tcp $host_tcp_http      -p 80 -s 'GET /\n' -e 'ThisShouldntMatch' -j", 1, $failedExpect );
+
+# Need the \r\n to make it more standards compliant with web servers. Need the various quotes
+# so that perl doesn't interpret the \r\n and is passed onto command line correctly
+$t += checkCmd( "./check_tcp $host_tcp_http      -p 80 -E -s ".'"GET /\r\n\r\n"'." -e 'ThisShouldntMatch' -j", 1, $failedExpect );
 
 exit(0) if defined($Test::Harness::VERSION);
 exit($tests - $t);





More information about the Commits mailing list