Masaya Suzuki | e4871cd | 2019-01-10 11:33:50 -0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | test_description='test GIT_CURL_VERBOSE' |
Johannes Schindelin | 028cb64 | 2020-11-18 23:44:34 +0000 | [diff] [blame] | 4 | GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main |
Johannes Schindelin | 334afbc | 2020-11-18 23:44:19 +0000 | [diff] [blame] | 5 | export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME |
| 6 | |
Masaya Suzuki | e4871cd | 2019-01-10 11:33:50 -0800 | [diff] [blame] | 7 | . ./test-lib.sh |
| 8 | . "$TEST_DIRECTORY"/lib-httpd.sh |
| 9 | start_httpd |
| 10 | |
| 11 | test_expect_success 'setup repository' ' |
| 12 | mkdir "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && |
| 13 | git -C "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" --bare init && |
| 14 | git config push.default matching && |
| 15 | echo content >file && |
| 16 | git add file && |
| 17 | git commit -m one && |
| 18 | git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && |
Johannes Schindelin | 028cb64 | 2020-11-18 23:44:34 +0000 | [diff] [blame] | 19 | git push public main:main |
Masaya Suzuki | e4871cd | 2019-01-10 11:33:50 -0800 | [diff] [blame] | 20 | ' |
| 21 | |
| 22 | test_expect_success 'failure in git-upload-pack is shown' ' |
| 23 | test_might_fail env GIT_CURL_VERBOSE=1 \ |
| 24 | git clone "$HTTPD_URL/error_git_upload_pack/smart/repo.git" \ |
| 25 | 2>curl_log && |
Jonathan Tan | 7167a62 | 2020-05-11 10:43:10 -0700 | [diff] [blame] | 26 | grep "<= Recv header: HTTP/1.1 500 Intentional Breakage" curl_log |
Masaya Suzuki | e4871cd | 2019-01-10 11:33:50 -0800 | [diff] [blame] | 27 | ' |
| 28 | |
Masaya Suzuki | e4871cd | 2019-01-10 11:33:50 -0800 | [diff] [blame] | 29 | test_done |