summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2014-02-05 19:27:27 -0800
committerBen Straub <bs@github.com>2014-02-05 19:27:27 -0800
commit5dae3ffe258a10881e6bb8042e865a7b96012a68 (patch)
tree2c1a64e23725032a7fe60a016b44407b8264d0e7
parent78ee7e81f59dc1e51551628f8f90ee58ea286cf8 (diff)
downloadlibgit2-5dae3ffe258a10881e6bb8042e865a7b96012a68.tar.gz
Only run clone-failure test on private repo
-rwxr-xr-xscript/cibuild.sh2
-rw-r--r--tests/online/clone.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/script/cibuild.sh b/script/cibuild.sh
index 5c0584a80..1f15e851e 100755
--- a/script/cibuild.sh
+++ b/script/cibuild.sh
@@ -34,5 +34,5 @@ export GITTEST_REMOTE_SSH_PUBKEY="$HOME/.ssh/id_rsa.pub"
export GITTEST_REMOTE_SSH_PASSPHRASE=""
if [ -e ./libgit2_clar ]; then
- ./libgit2_clar -sonline::push
+ ./libgit2_clar -sonline::push -sonline::clone::cred_callback_failure
fi
diff --git a/tests/online/clone.c b/tests/online/clone.c
index 757f34069..fa2408a75 100644
--- a/tests/online/clone.c
+++ b/tests/online/clone.c
@@ -198,15 +198,21 @@ static int cred_failure_cb(
void test_online_clone__cred_callback_failure_return_code_is_tunnelled(void)
{
const char *remote_url = cl_getenv("GITTEST_REMOTE_URL");
+ const char *remote_user = cl_getenv("GITTEST_REMOTE_USER");
if (!remote_url) {
printf("GITTEST_REMOTE_URL unset; skipping clone test\n");
return;
}
+ if (!remote_user) {
+ printf("GITTEST_REMOTE_USER unset; skipping clone test\n");
+ return;
+ }
+
g_options.remote_callbacks.credentials = cred_failure_cb;
- /* TODO: this doesn't work currently. */
+ /* TODO: this should expect -172. */
cl_git_fail_with(git_clone(&g_repo, remote_url, "./foo", &g_options), -1);
}