t/t1410-reflog.sh: use the $( ... ) construct for command substitution
[gitweb.git] / t / t5802-connect-helper.sh
index 878faf2b6318412df756f5b8cd2c00410f476e12..b7a7f9d5886f1e2f3fc2d65bfcf1785b890638ac 100755 (executable)
@@ -69,4 +69,32 @@ test_expect_success 'update backfilled tag without primary transfer' '
        test_cmp expect actual
 '
 
+
+test_expect_success 'set up fake git-daemon' '
+       mkdir remote &&
+       git init --bare remote/one.git &&
+       mkdir remote/host &&
+       git init --bare remote/host/two.git &&
+       write_script fake-daemon <<-\EOF &&
+       git daemon --inetd \
+               --informative-errors \
+               --export-all \
+               --base-path="$TRASH_DIRECTORY/remote" \
+               --interpolated-path="$TRASH_DIRECTORY/remote/%H%D" \
+               "$TRASH_DIRECTORY/remote"
+       EOF
+       export TRASH_DIRECTORY &&
+       PATH=$TRASH_DIRECTORY:$PATH
+'
+
+test_expect_success 'ext command can connect to git daemon (no vhost)' '
+       rm -rf dst &&
+       git clone "ext::fake-daemon %G/one.git" dst
+'
+
+test_expect_success 'ext command can connect to git daemon (vhost)' '
+       rm -rf dst &&
+       git clone "ext::fake-daemon %G/two.git %Vhost" dst
+'
+
 test_done