[Nagiosplug-checkins] nagiosplug/plugins/t check_http.t,1.9,1.10
Ton Voon
tonvoon at users.sourceforge.net
Wed Apr 5 00:59:16 CEST 2006
Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31270/plugins/t
Modified Files:
check_http.t
Log Message:
Allow multiple -k parameters (Gerd Mueller - 1457726)
Index: check_http.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_http.t,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- check_http.t 29 Mar 2006 08:18:50 -0000 1.9
+++ check_http.t 5 Apr 2006 07:58:29 -0000 1.10
@@ -9,7 +9,7 @@
use Test::More;
use NPTest;
-plan tests => 12;
+plan tests => 14;
my $successOutput = '/OK.*HTTP.*second/';
@@ -34,6 +34,16 @@
like( $res->output, $successOutput, "Output OK" );
$res = NPTest->testCmd(
+ "./check_http $host_tcp_http -wt 300 -ct 600 -v -v -v -k 'bob:there;fred:here'"
+ );
+like( $res->output, '/bob:there\r\nfred:here\r\n/', "Got headers, delimited with ';'" );
+
+$res = NPTest->testCmd(
+ "./check_http $host_tcp_http -wt 300 -ct 600 -v -v -v -k 'bob:there;fred:here' -k 'carl:frown'"
+ );
+like( $res->output, '/bob:there\r\nfred:here\r\ncarl:frown\r\n/', "Got headers with multiple -k options" );
+
+$res = NPTest->testCmd(
"./check_http $host_nonresponsive -wt 1 -ct 2"
);
cmp_ok( $res->return_code, '==', 2, "Webserver $host_nonresponsive not responding" );
More information about the Commits
mailing list