diff options
author | Jeff King <peff@peff.net> | 2023-02-23 11:05:07 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-23 21:01:15 (GMT) |
commit | b71a2bf11fa7b2b146a88b9af5b0ae05e5796b24 (patch) | |
tree | 342e2b868a3d843c9ce2e6c833e17b741e72a7b5 /t/t5551-http-fetch-smart.sh | |
parent | 93ea5bf3a888381cb5c2e75436c8c48fd9577f01 (diff) | |
download | git-b71a2bf11fa7b2b146a88b9af5b0ae05e5796b24.zip git-b71a2bf11fa7b2b146a88b9af5b0ae05e5796b24.tar.gz git-b71a2bf11fa7b2b146a88b9af5b0ae05e5796b24.tar.bz2 |
t5551: drop curl trace lines without headers
We pick apart a curl trace, looking for "=> Send header:" and so on, and
matching against an expected set of requests and responses. We remove
"== Info" lines entirely. However, our parser is fooled when running the
test with LIB_HTTPD_SSL on Ubuntu 20.04 (as found in our linux-gcc CI
job), as curl hands us an "Info" buffer with a newline, and we get:
== Info: successfully set certificate verify locations:
== Info: CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
=> Send SSL data[...]
which results in the "CApath" line ending up in the cleaned-up output,
causing the test to fail.
Arguably the tracing code should detect this and put it on two separate
"== Info" lines. But this is actually a curl bug, fixed by their
80d73bcca (tls: provide the CApath verbose log on its own line,
2020-08-18). It's simpler to just work around it here.
Since we are using GIT_TRACE_CURL, every line should just start with one
of "<=", "==", or "=>", and we can throw away anything else. In fact, we
can just replace the pattern for deleting "*" lines. Those were from the
old GIT_CURL_VERBOSE output, but we switched over in 14e24114d9
(t5551-http-fetch-smart.sh: use the GIT_TRACE_CURL environment var,
2016-09-05).
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-x | t/t5551-http-fetch-smart.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh index 2e42271..13b38c7 100755 --- a/t/t5551-http-fetch-smart.sh +++ b/t/t5551-http-fetch-smart.sh @@ -86,7 +86,7 @@ test_expect_success 'clone http repository' ' '\'' | sed -e " s/Q\$// - /^[*] /d + /^[^<=]/d /^== Info:/d /^=> Send header, /d /^=> Send header:$/d |