Commit fe9a5dd3 by Edward Thomson

remote: ensure we can create an anon remote on inmemory repo

Given a wholly in-memory repository, ensure that we can create an
anonymous remote and perform actions on it.
parent 2d486781
......@@ -465,3 +465,19 @@ void test_network_remote_local__push_delete(void)
cl_fixture_cleanup("target.git");
cl_git_sandbox_cleanup();
}
void test_network_remote_local__anonymous_remote_inmemory_repo(void)
{
git_repository *inmemory;
git_remote *remote;
git_buf_sets(&file_path_buf, cl_git_path_url(cl_fixture("testrepo.git")));
cl_git_pass(git_repository_new(&inmemory));
cl_git_pass(git_remote_create_anonymous(&remote, inmemory, git_buf_cstr(&file_path_buf)));
cl_git_pass(git_remote_connect(remote, GIT_DIRECTION_FETCH, NULL, NULL, NULL));
cl_assert(git_remote_connected(remote));
git_remote_disconnect(remote);
git_remote_free(remote);
git_repository_free(inmemory);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment