From 0106a9df3d90e4c7bb5a0037203a23be856e343f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 23 Jan 2022 17:36:15 +0300 Subject: test/test.sh: print curl output on failure --- test/test.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test.sh b/test/test.sh index db44d5f..77a15e2 100755 --- a/test/test.sh +++ b/test/test.sh @@ -73,11 +73,10 @@ run_curl() { local url="$1" curl \ --silent --show-error \ - --fail \ --dump-header "$curl_header_file" \ --output "$curl_output_file" \ --connect-timeout 3 \ - -- "http://localhost:$server_port$url" + -- "http://localhost:$server_port$url" || true } curl_check_status() { @@ -95,6 +94,11 @@ curl_check_status() { dump "Actual HTTP response: $actual" >&2 dump "Expected: $expected" >&2 + + dump 'HTTP headers:' >&2 + cat -- "$curl_header_file" >&2 + dump 'HTTP response:' >&2 + cat -- "$curl_output_file" >&2 return 1 } -- cgit v1.2.3