Skip to content

Commit b7bdb07

Browse files
committed
online::clone: test a googlesource URL
Google Git (googlesource.com) behaves differently than git proper. Test that we can communicate with it.
1 parent 629515a commit b7bdb07

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/online/clone.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#define BB_REPO_URL "https://libgit3@bitbucket.org/libgit2/testgitrepository.git"
1212
#define BB_REPO_URL_WITH_PASS "https://libgit3:libgit3@bitbucket.org/libgit2/testgitrepository.git"
1313
#define BB_REPO_URL_WITH_WRONG_PASS "https://libgit3:wrong@bitbucket.org/libgit2/testgitrepository.git"
14+
#define GOOGLESOURCE_REPO_URL "https://chromium.googlesource.com/external/github.com/sergi/go-diff"
1415

1516
#define SSH_REPO_URL "ssh://github.com/libgit2/TestGitRepository"
1617

@@ -463,6 +464,13 @@ void test_online_clone__bitbucket_falls_back_to_specified_creds(void)
463464
cl_fixture_cleanup("./foo");
464465
}
465466

467+
void test_online_clone__googlesource(void)
468+
{
469+
cl_git_pass(git_clone(&g_repo, GOOGLESOURCE_REPO_URL, "./foo", &g_options));
470+
git_repository_free(g_repo); g_repo = NULL;
471+
cl_fixture_cleanup("./foo");
472+
}
473+
466474
static int cancel_at_half(const git_indexer_progress *stats, void *payload)
467475
{
468476
GIT_UNUSED(payload);

0 commit comments

Comments
 (0)