From 480783187d95cc5cce18e0a9737a588328a5d18b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 16 Sep 2016 20:55:20 +0100 Subject: Improve error messages in test httpserver perl client script. --- test/httpserver/testfiles/testrequests.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test/httpserver/testfiles') diff --git a/test/httpserver/testfiles/testrequests.pl b/test/httpserver/testfiles/testrequests.pl index 4dd3549f..fd4274b4 100755 --- a/test/httpserver/testfiles/testrequests.pl +++ b/test/httpserver/testfiles/testrequests.pl @@ -49,7 +49,8 @@ if($response3->code() != 200) print "Redirected GET request...\n"; my $response4 = $ua->get("$url_base/redirect?key=value"); -exit 4 unless $response4->is_success(); +die "GET ".$response4->request()->url()." failed: ".$response4->content() + unless $response4->is_success(); my $content4 = $response4->content(); @@ -112,13 +113,11 @@ sub check_url my ($c,$url) = @_; unless($c =~ m~URI: (.+?)

~) { - print "URI not found\n"; - exit(1); + die "URI not found in response: '$c'\n"; } if($url ne $1) { - print "Wrong URI in content\n"; - exit(1); + die "Wrong URI in content: expected '$url' but found '$1'\n"; } } -- cgit v1.2.3