mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
8f788eb8b7
The previous change allowed for a Git server to advertise the 'bundle-uri' command as a capability based on the uploadPack.advertiseBundleURIs config option. Create a set of tests that check that this capability is advertised using 'git ls-remote'. In order to test this functionality across three protocols (file, git, and http), create lib-bundle-uri-protocol.sh to generalize the tests, allowing the other test scripts to set an environment variable and otherwise inherit the setup and tests from this script. The tests currently only test that the 'bundle-uri' command is advertised or not. Other actions will be tested as the Git client learns to request the 'bundle-uri' command and parse its response. To help with URI escaping, specifically for file paths with a space in them, extract a 'sed' invocation from t9199-git-svn-info.sh into a helper function for use here, too. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 lines
344 B
Bash
Executable file
17 lines
344 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description="Test bundle-uri with protocol v2 and 'file://' transport"
|
|
|
|
TEST_NO_CREATE_REPO=1
|
|
|
|
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
|
|
|
. ./test-lib.sh
|
|
|
|
# Test protocol v2 with 'file://' transport
|
|
#
|
|
BUNDLE_URI_PROTOCOL=file
|
|
. "$TEST_DIRECTORY"/lib-bundle-uri-protocol.sh
|
|
|
|
test_done
|