diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-04-05 07:58:29 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-04-05 07:58:29 +0000 |
commit | 39e0ee3dcd831ddd3a7777fe55e6788825babac7 (patch) | |
tree | f71d2a7f69a7e64e005708ae77e38ea365736ed9 /plugins/t/check_http.t | |
parent | f235579d0dd75aa676465a8371d22137640a34ae (diff) | |
download | monitoring-plugins-39e0ee3dcd831ddd3a7777fe55e6788825babac7.tar.gz |
Allow multiple -k parameters (Gerd Mueller - 1457726)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1367 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/t/check_http.t')
-rw-r--r-- | plugins/t/check_http.t | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index 408906d9..3154151f 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t | |||
@@ -9,7 +9,7 @@ use strict; | |||
9 | use Test::More; | 9 | use Test::More; |
10 | use NPTest; | 10 | use NPTest; |
11 | 11 | ||
12 | plan tests => 12; | 12 | plan tests => 14; |
13 | 13 | ||
14 | my $successOutput = '/OK.*HTTP.*second/'; | 14 | my $successOutput = '/OK.*HTTP.*second/'; |
15 | 15 | ||
@@ -34,6 +34,16 @@ cmp_ok( $res->return_code, '==', 0, "Webserver $host_tcp_http responded" ); | |||
34 | like( $res->output, $successOutput, "Output OK" ); | 34 | like( $res->output, $successOutput, "Output OK" ); |
35 | 35 | ||
36 | $res = NPTest->testCmd( | 36 | $res = NPTest->testCmd( |
37 | "./check_http $host_tcp_http -wt 300 -ct 600 -v -v -v -k 'bob:there;fred:here'" | ||
38 | ); | ||
39 | like( $res->output, '/bob:there\r\nfred:here\r\n/', "Got headers, delimited with ';'" ); | ||
40 | |||
41 | $res = NPTest->testCmd( | ||
42 | "./check_http $host_tcp_http -wt 300 -ct 600 -v -v -v -k 'bob:there;fred:here' -k 'carl:frown'" | ||
43 | ); | ||
44 | like( $res->output, '/bob:there\r\nfred:here\r\ncarl:frown\r\n/', "Got headers with multiple -k options" ); | ||
45 | |||
46 | $res = NPTest->testCmd( | ||
37 | "./check_http $host_nonresponsive -wt 1 -ct 2" | 47 | "./check_http $host_nonresponsive -wt 1 -ct 2" |
38 | ); | 48 | ); |
39 | cmp_ok( $res->return_code, '==', 2, "Webserver $host_nonresponsive not responding" ); | 49 | cmp_ok( $res->return_code, '==', 2, "Webserver $host_nonresponsive not responding" ); |