diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-18 18:31:59 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-18 18:31:59 +0200 |
commit | 717b0e8d9c31f3c3cc1ab0794f836f701d948d18 (patch) | |
tree | dbecf1018edd02bb515fbec853e728f4a2d8b661 /plugins/tests | |
parent | 2a8eab6b31e0f461e52b504776caad6bb93b981f (diff) | |
download | monitoring-plugins-717b0e8d9c31f3c3cc1ab0794f836f701d948d18.tar.gz |
Fix the "check_http -d" tests
Diffstat (limited to 'plugins/tests')
-rwxr-xr-x | plugins/tests/check_http.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t index 873fd6ec..c3085e13 100755 --- a/plugins/tests/check_http.t +++ b/plugins/tests/check_http.t | |||
@@ -17,7 +17,7 @@ use Test::More; | |||
17 | use NPTest; | 17 | use NPTest; |
18 | use FindBin qw($Bin); | 18 | use FindBin qw($Bin); |
19 | 19 | ||
20 | my $common_tests = 66; | 20 | my $common_tests = 70; |
21 | my $ssl_only_tests = 8; | 21 | my $ssl_only_tests = 8; |
22 | # Check that all dependent modules are available | 22 | # Check that all dependent modules are available |
23 | eval { | 23 | eval { |
@@ -229,11 +229,11 @@ sub run_common_tests { | |||
229 | 229 | ||
230 | $result = NPTest->testCmd( "$command -u /header_check -d foo" ); | 230 | $result = NPTest->testCmd( "$command -u /header_check -d foo" ); |
231 | is( $result->return_code, 0, "header_check search for string"); | 231 | is( $result->return_code, 0, "header_check search for string"); |
232 | like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - 274 bytes in [\d\.]+ second/', "Output correct" ); | 232 | like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - 96 bytes in [\d\.]+ second/', "Output correct" ); |
233 | 233 | ||
234 | $result = NPTest->testCmd( "$command -u /header_check -d foobar" ); | 234 | $result = NPTest->testCmd( "$command -u /header_check -d bar" ); |
235 | is( $result->return_code, 2, "Missing header string check"); | 235 | is( $result->return_code, 2, "Missing header string check"); |
236 | like( $result->output, qr%^HTTP CRITICAL: HTTP/1\.1 200 OK - string 'foobar' not found on 'https?://127\.0\.0\.1:\d+/header_check/root'%, "Shows search string and location"); | 236 | like( $result->output, qr%^HTTP CRITICAL: HTTP/1\.1 200 OK - header 'bar' not found on 'https?://127\.0\.0\.1:\d+/header_check'%, "Shows search string and location"); |
237 | 237 | ||
238 | my $cmd; | 238 | my $cmd; |
239 | $cmd = "$command -u /slow"; | 239 | $cmd = "$command -u /slow"; |