mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
27 lines
506 B
Bash
27 lines
506 B
Bash
![]() |
#!/bin/sh
|
||
|
|
||
|
test_description='reftable HTTPD tests'
|
||
|
|
||
|
. ./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
|