Merge branch 'es/worktree-repair-copied' into cw/worktrees-relative
[git/gitster.git] / t / t5581-http-curl-verbose.sh
blob724f61005427b3b10c7f495691e50b27b633ea8d
1 #!/bin/sh
3 test_description='test GIT_CURL_VERBOSE'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7 TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9 . "$TEST_DIRECTORY"/lib-httpd.sh
10 start_httpd
12 test_expect_success 'setup repository' '
13 mkdir "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
14 git -C "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" --bare init &&
15 git config push.default matching &&
16 echo content >file &&
17 git add file &&
18 git commit -m one &&
19 git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
20 git push public main:main
23 test_expect_success 'failure in git-upload-pack is shown' '
24 test_might_fail env GIT_CURL_VERBOSE=1 \
25 git clone "$HTTPD_URL/error_git_upload_pack/smart/repo.git" \
26 2>curl_log &&
27 grep "<= Recv header: HTTP/1.1 500 Intentional Breakage" curl_log
30 test_done