Commit e66a4eb37cf3d8c369e662c60fdb0b3cfc459d8e

Edward Thomson 2019-06-05T14:19:14

online tests: use gitlab for auth failures GitHub recently changed their behavior from returning 401s for private or nonexistent repositories on a clone to returning 404s. For our tests that require an auth failure (and 401), move to GitLab to request a missing repository. This lets us continue to test our auth failure case, at least until they decide to mimic that decision.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tests/online/clone.c b/tests/online/clone.c
index faf8a0f..0d0334c 100644
--- a/tests/online/clone.c
+++ b/tests/online/clone.c
@@ -334,7 +334,7 @@ void test_online_clone__cred_callback_called_again_on_auth_failure(void)
 	git__free(_remote_url);
 	git__free(_remote_user);
 
-	_remote_url = git__strdup("https://github.com/libgit2/non-existent");
+	_remote_url = git__strdup("https://gitlab.com/libgit2/non-existent");
 	_remote_user = git__strdup("libgit2test");
 
 	g_options.fetch_opts.callbacks.credentials = cred_count_calls_cb;