summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-06-07 12:48:48 +0200
committerPatrick Steinhardt <ps@pks.im>2018-01-03 11:50:39 +0000
commitfea6092079d5c09b499e472efead2f7aa81ce8a1 (patch)
treeec55be6b41fd09d010ec8e8999c5c40f0d117da4 /script
parent543ec149b86a68e12dd141a6141e82850dabbf21 (diff)
downloadlibgit2-fea6092079d5c09b499e472efead2f7aa81ce8a1.tar.gz
tests: online::clone: construct credential-URL from environment
We support two types of passing credentials to the proxy, either via the URL or explicitly by specifying user and password. We test these types by modifying the proxy URL and executing the tests twice, which is in fact unnecessary and requires us to maintain the list of environment variables and test executions across multiple CI infrastructures. To fix the situation, we can just always pass the host, port, user and password to the tests. The tests can then assemble the complete URL either with or without included credentials, allowing us to test both cases in-process.
Diffstat (limited to 'script')
-rwxr-xr-xscript/cibuild.sh14
1 files changed, 5 insertions, 9 deletions
diff --git a/script/cibuild.sh b/script/cibuild.sh
index 1c28baae6..c06de1933 100755
--- a/script/cibuild.sh
+++ b/script/cibuild.sh
@@ -90,7 +90,10 @@ export GITTEST_REMOTE_USER=$USER
export GITTEST_REMOTE_SSH_KEY="$HOME/.ssh/id_rsa"
export GITTEST_REMOTE_SSH_PUBKEY="$HOME/.ssh/id_rsa.pub"
export GITTEST_REMOTE_SSH_PASSPHRASE=""
-
+# Use the proxy we started at the beginning
+export GITTEST_REMOTE_PROXY_URL="localhost:8080"
+export GITTEST_REMOTE_PROXY_USER="foo"
+export GITTEST_REMOTE_PROXY_PASS="bar"
if [ -e ./libgit2_clar ]; then
./libgit2_clar -sonline::push -sonline::clone::ssh_cert &&
@@ -99,14 +102,7 @@ if [ -e ./libgit2_clar ]; then
./libgit2_clar -sonline::clone::cred_callback || exit $?
fi
- # Use the proxy we started at the beginning
- export GITTEST_REMOTE_PROXY_URL="http://foo:bar@localhost:8080/"
- ./libgit2_clar -sonline::clone::proxy_credentials_in_url || exit $?
- export GITTEST_REMOTE_PROXY_URL="http://localhost:8080/"
- export GITTEST_REMOTE_PROXY_USER="foo"
- export GITTEST_REMOTE_PROXY_PASS="bar"
- ./libgit2_clar -sonline::clone::proxy_credentials_request || exit $?
-
+ ctest -V -R libgit2_clar-proxy_credentials || exit $?
fi
kill $(cat "$HOME/sshd/pid")