aboutsummaryrefslogtreecommitdiffstats
path: root/t/t5551-http-fetch-smart.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-11-23 11:22:23 +0900
committerJunio C Hamano <gitster@pobox.com>2022-11-23 11:22:23 +0900
commit6adf17050b1b28612fd49a11b302b959fee1e192 (patch)
treeca483fc3f2fe8a426922ec7b14ca2268966cf0ae /t/t5551-http-fetch-smart.sh
parent4b76998ff0e960759f492f1390e00b24c90537b8 (diff)
parentb637a41ebe0e65b6d64dd65efaf848b4705dcbed (diff)
downloadgit-6adf17050b1b28612fd49a11b302b959fee1e192.tar.gz
Merge branch 'gc/redact-h2h3-headers'
Redact headers from cURL's h2h3 module in GIT_CURL_VERBOSE and others. * gc/redact-h2h3-headers: http: redact curl h2h3 headers in info t: run t5551 tests with both HTTP and HTTP/2
Diffstat (limited to 't/t5551-http-fetch-smart.sh')
-rwxr-xr-xt/t5551-http-fetch-smart.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
index 64c6c9f59e..bc0719a4fc 100755
--- a/t/t5551-http-fetch-smart.sh
+++ b/t/t5551-http-fetch-smart.sh
@@ -1,13 +1,19 @@
#!/bin/sh
-test_description='test smart fetching over http via http-backend'
+: ${HTTP_PROTO:=HTTP}
+test_description="test smart fetching over http via http-backend ($HTTP_PROTO)"
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-httpd.sh
+test "$HTTP_PROTO" = "HTTP/2" && enable_http2
start_httpd
+test_expect_success HTTP2 'enable client-side http/2' '
+ git config --global http.version HTTP/2
+'
+
test_expect_success 'setup repository' '
git config push.default matching &&
echo content >file &&
@@ -347,7 +353,10 @@ test_expect_success CMDLINE_LIMIT \
test_expect_success 'large fetch-pack requests can be sent using chunked encoding' '
GIT_TRACE_CURL=true git -c http.postbuffer=65536 \
clone --bare "$HTTPD_URL/smart/repo.git" split.git 2>err &&
- grep "^=> Send header: Transfer-Encoding: chunked" err
+ {
+ test_have_prereq HTTP2 ||
+ grep "^=> Send header: Transfer-Encoding: chunked" err
+ }
'
test_expect_success 'test allowreachablesha1inwant' '