[nagiosplug] Fix the "check_http -d" tests
"Nagios Plugin Development" <[email protected]> Sun, 18 Aug 2013 16:40:24 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug Branch: master Commit: 717b0e8d9c31f3c3cc1ab0794f836f701d948d18 Author: Holger Weiss <[email protected]> Date: Sun Aug 18 18:31:59 2013 +0200 URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=717b0e8 Fix the "check_http -d" tests --- 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 873fd6e..c3085e1 100755 --- a/plugins/tests/check_http.t +++ b/plugins/tests/check_http.t @@ -17,7 +17,7 @@ use Test::More; use NPTest; use FindBin qw($Bin); -my $common_tests = 66; +my $common_tests = 70; my $ssl_only_tests = 8; # Check that all dependent modules are available eval { @@ -229,11 +229,11 @@ sub run_common_tests { $result = NPTest->testCmd( "$command -u /header_check -d foo" ); is( $result->return_code, 0, "header_check search for string"); - like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - 274 bytes in [\d\.]+ second/', "Output correct" ); + like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - 96 bytes in [\d\.]+ second/', "Output correct" ); - $result = NPTest->testCmd( "$command -u /header_check -d foobar" ); + $result = NPTest->testCmd( "$command -u /header_check -d bar" ); is( $result->return_code, 2, "Missing header string check"); - 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"); + 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"); my $cmd; $cmd = "$command -u /slow"; ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk