summaryrefslogtreecommitdiffstats
path: root/t/t0611-reftable-httpd.sh
blob: 5e05b9c1f2ac73deac78ce6fa91e60cb377a3c68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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