aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xt/t5570-git-daemon.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t5570-git-daemon.sh b/t/t5570-git-daemon.sh
index 6b1637995..3eb7d3186 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