aboutsummaryrefslogtreecommitdiffstats
path: root/t/t5551-http-fetch-smart.sh
diff options
context:
space:
mode:
authorJosh Steadmon <steadmon@google.com>2019-02-06 14:19:10 -0500
committerJunio C Hamano <gitster@pobox.com>2019-02-06 12:20:23 -0800
commit30dea56536e78ad8a9533d51ad1d8c9c85c3c7bd (patch)
tree1fe88d737e5591d63908517b57b244d1c857d143 /t/t5551-http-fetch-smart.sh
parentcbdb8d14392690f2e540b9efdb245871a043eb06 (diff)
downloadgit-30dea56536e78ad8a9533d51ad1d8c9c85c3c7bd.tar.gz
t5551: test server-side ERR packet
When a smart HTTP server sends an error message via pkt-line, we detect the error due to using PACKET_READ_DIE_ON_ERR_PACKET. This case was added by 2d103c31c2 (pack-protocol.txt: accept error packets in any context, 2018-12-29), but not covered by tests. Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5551-http-fetch-smart.sh')
-rwxr-xr-xt/t5551-http-fetch-smart.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
index 8630b0cc39..ba83e567e5 100755
--- a/t/t5551-http-fetch-smart.sh
+++ b/t/t5551-http-fetch-smart.sh
@@ -429,5 +429,10 @@ test_expect_success 'GIT_TRACE_CURL_NO_DATA prevents data from being traced' '
! grep "=> Send data" err
'
+test_expect_success 'server-side error detected' '
+ test_must_fail git clone $HTTPD_URL/error_smart/repo.git 2>actual &&
+ grep "server-side error" actual
+'
+
stop_httpd
test_done