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