summaryrefslogtreecommitdiff
path: root/test/httpserver/testfiles/testrequests.pl
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2016-09-16 20:55:20 +0100
committerChris Wilson <chris+github@qwirx.com>2016-09-16 20:55:20 +0100
commit480783187d95cc5cce18e0a9737a588328a5d18b (patch)
tree5e0b861e3bd1f512e9b65dfcca52f27c3c7ee6bf /test/httpserver/testfiles/testrequests.pl
parentba3928734bd20567819b5fc56c93f5d95965bd7a (diff)
Improve error messages in test httpserver perl client script.
Diffstat (limited to 'test/httpserver/testfiles/testrequests.pl')
-rwxr-xr-xtest/httpserver/testfiles/testrequests.pl9
1 files changed, 4 insertions, 5 deletions
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:</b> (.+?)</p>~)
{
- 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";
}
}