Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Test the dumb transport allowlist in one table
The allowlist was tested in two places, and the 404 alone did not show
the transport was live behind the auth filter, since a page that does
not exist answers the same. A loose object and HEAD now have to come
through, and the planted alternates file is removed even when the test
fails, where it used to leave rob borrowing foo's objects.
Diffstat (limited to 'tests/t0303-robustness.sh')
| -rwxr-xr-x | tests/t0303-robustness.sh | 17 |
1 file changed, 0 insertions, 17 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index bb405f1..7e79b87 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -633,23 +633,6 @@ test_expect_success 'the dumb transport sends a file with its size' ' cmp body repos/rob/.git/objects/pack/$pack ' -# The alternates file lists object directories by their path on the server, -# which a client fetching over http cannot use and should not learn. -test_expect_success 'the dumb transport withholds the alternates file' ' - mkdir -p repos/rob/.git/objects/info && - echo "$PWD/repos/foo/.git/objects" >repos/rob/.git/objects/info/alternates && - for path in info/alternates info//alternates info/./alternates ./info/alternates \ - info/Alternates /info/alternates - do - cgit_rc robrc "url=rob/objects/$path" >tmp && - grep "^Status: 404" tmp && - ! grep "repos/foo" tmp || return 1 - done && - rm repos/rob/.git/objects/info/alternates && - cgit_rc robrc "url=rob/objects/info/packs" >tmp && - grep "^Status: 200" tmp -' - # A reftable repository keeps only a placeholder in its HEAD file, so the # branch a client is to check out has to come from the refs instead. test_expect_success 'the dumb transport answers HEAD from the refs' ' |
