blob: 5129b0724f703890c80c8dcbe7bd4347792963e3 [file] [log] [blame]
Masaya Suzukie4871cd2019-01-10 11:33:50 -08001#!/bin/sh
2
3test_description='test GIT_CURL_VERBOSE'
4. ./test-lib.sh
5. "$TEST_DIRECTORY"/lib-httpd.sh
6start_httpd
7
8test_expect_success 'setup repository' '
9 mkdir "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
10 git -C "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" --bare init &&
11 git config push.default matching &&
12 echo content >file &&
13 git add file &&
14 git commit -m one &&
15 git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
16 git push public master:master
17'
18
19test_expect_success 'failure in git-upload-pack is shown' '
20 test_might_fail env GIT_CURL_VERBOSE=1 \
21 git clone "$HTTPD_URL/error_git_upload_pack/smart/repo.git" \
22 2>curl_log &&
23 grep "< HTTP/1.1 500 Intentional Breakage" curl_log
24'
25
Masaya Suzukie4871cd2019-01-10 11:33:50 -080026test_done