diff options
author | Jeff King <peff@peff.net> | 2015-02-17 03:40:57 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-02-17 13:15:07 -0800 |
commit | 5248f2dd4fe763ef9d1267f50481deee36ee57c1 (patch) | |
tree | 005953b09dfb2baa3a056895597076d347a29801 | |
parent | git_connect: let user override virtual-host we send to daemon (diff) | |
download | tgif-5248f2dd4fe763ef9d1267f50481deee36ee57c1.tar.xz |
t5570: test git-daemon's --interpolated-path option
We did not test this at all; let's just give a basic sanity
check that we can find a path based on virtual hosting, and
that the downcase canonicalization works.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t5570-git-daemon.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh index 6b16379951..3eb7d3186e 100755 --- a/t/t5570-git-daemon.sh +++ b/t/t5570-git-daemon.sh @@ -142,4 +142,20 @@ test_expect_success 'read access denied' "test_remote_error -x 'no such reposito test_expect_success 'not exported' "test_remote_error -n 'repository not exported' fetch repo.git " stop_git_daemon +start_git_daemon --interpolated-path="$GIT_DAEMON_DOCUMENT_ROOT_PATH/%H%D" + +test_expect_success 'access repo via interpolated hostname' ' + repo="$GIT_DAEMON_DOCUMENT_ROOT_PATH/localhost/interp.git" && + git init --bare "$repo" && + git push "$repo" HEAD && + >"$repo"/git-daemon-export-ok && + rm -rf tmp.git && + GIT_OVERRIDE_VIRTUAL_HOST=localhost \ + git clone --bare "$GIT_DAEMON_URL/interp.git" tmp.git && + rm -rf tmp.git && + GIT_OVERRIDE_VIRTUAL_HOST=LOCALHOST \ + git clone --bare "$GIT_DAEMON_URL/interp.git" tmp.git +' + +stop_git_daemon test_done |