mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 17:24:59 +00:00
Only run clone-failure test on private repo
This commit is contained in:
parent
78ee7e81f5
commit
5dae3ffe25
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user