Git 2.45
[git/gitster.git] / t / t0611-reftable-httpd.sh
blob5e05b9c1f2ac73deac78ce6fa91e60cb377a3c68
1 #!/bin/sh
3 test_description='reftable HTTPD tests'
5 . ./test-lib.sh
6 . "$TEST_DIRECTORY"/lib-httpd.sh
8 start_httpd
10 REPO="$HTTPD_DOCUMENT_ROOT_PATH/repo"
12 test_expect_success 'serving ls-remote' '
13 git init --ref-format=reftable -b main "$REPO" &&
14 cd "$REPO" &&
15 test_commit m1 &&
16 >.git/git-daemon-export-ok &&
17 git ls-remote "http://127.0.0.1:$LIB_HTTPD_PORT/smart/repo" | cut -f 2-2 -d " " >actual &&
18 cat >expect <<-EOF &&
19 HEAD
20 refs/heads/main
21 refs/tags/m1
22 EOF
23 test_cmp actual expect
26 test_done