transport: add a protocol-whitelist environment variable
[alt-git.git] / t / t5812-proto-disable-http.sh
blobdd5001cbac8a0a66a3235e9e6c83a62bc1ab595f
1 #!/bin/sh
3 test_description='test disabling of git-over-http in clone/fetch'
4 . ./test-lib.sh
5 . "$TEST_DIRECTORY/lib-proto-disable.sh"
6 . "$TEST_DIRECTORY/lib-httpd.sh"
7 start_httpd
9 test_expect_success 'create git-accessible repo' '
10 bare="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
11 test_commit one &&
12 git --bare init "$bare" &&
13 git push "$bare" HEAD &&
14 git -C "$bare" config http.receivepack true
17 test_proto "smart http" http "$HTTPD_URL/smart/repo.git"
19 stop_httpd
20 test_done