summaryrefslogtreecommitdiff
path: root/tests/network/remote/remotes.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-12-16 08:57:05 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2014-12-30 17:02:50 +0000
commitfe794b2ea7fa2b59c2394eb874c4be99c115c693 (patch)
treeb8e6bb148cf6a911366f86d21c87ace163046244 /tests/network/remote/remotes.c
parent4eb97ef3bf18403fbce351ae4cac673655d2886a (diff)
downloadlibgit2-cmn/hide-push.tar.gz
remote: remove git_push from the public APIcmn/hide-push
Instead we provide git_remote_upload() and git_remote_update_tips() in order to have a parallel API for fetching and pushing.
Diffstat (limited to 'tests/network/remote/remotes.c')
-rw-r--r--tests/network/remote/remotes.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/network/remote/remotes.c b/tests/network/remote/remotes.c
index 07ad934c7..995f1d541 100644
--- a/tests/network/remote/remotes.c
+++ b/tests/network/remote/remotes.c
@@ -72,7 +72,14 @@ void test_network_remote_remotes__error_when_not_found(void)
void test_network_remote_remotes__error_when_no_push_available(void)
{
git_remote *r;
- git_push *p;
+ char *specs = {
+ "refs/heads/master",
+ };
+ git_strarray arr = {
+ &specs,
+ 1,
+ };
+
cl_git_pass(git_remote_create_anonymous(&r, _repo, cl_fixture("testrepo.git"), NULL));
@@ -83,11 +90,8 @@ void test_network_remote_remotes__error_when_no_push_available(void)
/* Make sure that push is really not available */
r->transport->push = NULL;
- cl_git_pass(git_push_new(&p, r));
- cl_git_pass(git_push_add_refspec(p, "refs/heads/master"));
- cl_git_fail_with(git_push_finish(p), GIT_ERROR);
+ cl_git_fail_with(-1, git_remote_upload(r, &arr, NULL));
- git_push_free(p);
git_remote_free(r);
}