1
0
Fork 0
git/t/t0611-reftable-httpd.sh
Daniel Baumann 54102a2c29
Adding upstream version 1:2.47.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-23 07:43:39 +02:00

27 lines
537 B
Bash
Executable file

#!/bin/sh
test_description='reftable HTTPD tests'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
REPO="$HTTPD_DOCUMENT_ROOT_PATH/repo"
test_expect_success 'serving ls-remote' '
git init --ref-format=reftable -b main "$REPO" &&
cd "$REPO" &&
test_commit m1 &&
>.git/git-daemon-export-ok &&
git ls-remote "http://127.0.0.1:$LIB_HTTPD_PORT/smart/repo" | cut -f 2-2 -d " " >actual &&
cat >expect <<-EOF &&
HEAD
refs/heads/main
refs/tags/m1
EOF
test_cmp actual expect
'
test_done