summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-07-30 10:48:57 -0400
committerEdward Thomson <edward.thomson@vercel.com>2023-02-14 16:17:36 +0000
commita5534d1765036c8aec4c08ba3b2590cd20eb2852 (patch)
treeb86940828174508c40c5a7c2cb0cfedee42ea364
parent1119326aadfca4062679722b3ed975b569bcc0cf (diff)
downloadlibgit2-ethomson/test_urls_with_spaces.tar.gz
tests: test URLs with spacesethomson/test_urls_with_spaces
-rwxr-xr-xci/test.sh33
1 files changed, 27 insertions, 6 deletions
diff --git a/ci/test.sh b/ci/test.sh
index 230daaaa0..ad2589479 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -106,6 +106,7 @@ if [ -z "$SKIP_GITDAEMON_TESTS" ]; then
echo "Starting git daemon (standard)..."
GIT_STANDARD_DIR=`mktemp -d ${TMPDIR}/git_standard.XXXXXXXX`
git init --bare "${GIT_STANDARD_DIR}/test.git" >/dev/null
+ git init --bare "${GIT_STANDARD_DIR}/test with spaces.git"
git daemon --listen=localhost --export-all --enable=receive-pack --base-path="${GIT_STANDARD_DIR}" "${GIT_STANDARD_DIR}" 2>/dev/null &
GIT_STANDARD_PID=$!
@@ -134,6 +135,7 @@ if [ -z "$SKIP_NTLM_TESTS" -o -z "$SKIP_ONLINE_TESTS" ]; then
echo "Starting HTTP server..."
HTTP_DIR=`mktemp -d ${TMPDIR}/http.XXXXXXXX`
git init --bare "${HTTP_DIR}/test.git"
+ git init --bare "${HTTP_DIR}/test with spaces.git"
java -jar poxygit.jar --address 127.0.0.1 --port 9000 --credentials foo:baz --quiet "${HTTP_DIR}" &
HTTP_PID=$!
fi
@@ -143,6 +145,7 @@ if [ -z "$SKIP_SSH_TESTS" ]; then
HOME=`mktemp -d ${TMPDIR}/home.XXXXXXXX`
SSHD_DIR=`mktemp -d ${TMPDIR}/sshd.XXXXXXXX`
git init --bare "${SSHD_DIR}/test.git" >/dev/null
+ git init --bare "${SSHD_DIR}/test with spaces.git" >/dev/null
cat >"${SSHD_DIR}/sshd_config" <<-EOF
Port 2222
ListenAddress 0.0.0.0
@@ -253,6 +256,14 @@ if [ -z "$SKIP_GITDAEMON_TESTS" ]; then
unset GITTEST_REMOTE_URL
echo ""
+ echo "Running gitdaemon (spaces in path) tests"
+ echo ""
+
+ export GITTEST_REMOTE_URL="git://localhost/test%20with%20spaces.git"
+ run_test gitdaemon
+ unset GITTEST_REMOTE_URL
+
+ echo ""
echo "Running gitdaemon (namespace) tests"
echo ""
@@ -290,27 +301,29 @@ if [ -z "$SKIP_PROXY_TESTS" ]; then
fi
if [ -z "$SKIP_NTLM_TESTS" ]; then
+ export GITTEST_REMOTE_USER="foo"
+ export GITTEST_REMOTE_PASS="baz"
+
echo ""
echo "Running NTLM tests (IIS emulation)"
echo ""
export GITTEST_REMOTE_URL="http://localhost:9000/ntlm/test.git"
- export GITTEST_REMOTE_USER="foo"
- export GITTEST_REMOTE_PASS="baz"
+ run_test auth_clone_and_push
+ export GITTEST_REMOTE_URL="http://localhost:9000/ntlm/test%20with%20spaces.git"
run_test auth_clone_and_push
unset GITTEST_REMOTE_URL
- unset GITTEST_REMOTE_USER
- unset GITTEST_REMOTE_PASS
echo ""
echo "Running NTLM tests (Apache emulation)"
echo ""
export GITTEST_REMOTE_URL="http://localhost:9000/broken-ntlm/test.git"
- export GITTEST_REMOTE_USER="foo"
- export GITTEST_REMOTE_PASS="baz"
+ run_test auth_clone_and_push
+ export GITTEST_REMOTE_URL="http://localhost:9000/broken-ntlm/test%20with%20spaces.git"
run_test auth_clone_and_push
unset GITTEST_REMOTE_URL
+
unset GITTEST_REMOTE_USER
unset GITTEST_REMOTE_PASS
fi
@@ -371,6 +384,14 @@ if [ -z "$SKIP_SSH_TESTS" ]; then
run_test ssh
unset GITTEST_REMOTE_URL
+ echo ""
+ echo "Running ssh tests (spaces in path)"
+ echo ""
+
+ export GITTEST_REMOTE_URL="ssh://localhost:2222/$SSHD_DIR/test%20with%20spaces.git"
+ run_test ssh
+ unset GITTEST_REMOTE_URL
+
unset GITTEST_REMOTE_USER
unset GITTEST_REMOTE_SSH_KEY
unset GITTEST_REMOTE_SSH_PUBKEY