diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-02-11 12:09:02 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-02-11 12:09:02 +0100 |
commit | d0155564148550167e756e440b5f9ce71c76abb3 (patch) | |
tree | cb6f7637286c8236997dc736133bbac4217d5e35 /clients/ssh/git_upload_pack_test.go | |
parent | 35ee4d749be21691b78a7465361ad47179fe2eff (diff) | |
download | go-git-d0155564148550167e756e440b5f9ce71c76abb3.tar.gz |
clients: removing url from the clients constructor
Diffstat (limited to 'clients/ssh/git_upload_pack_test.go')
-rw-r--r-- | clients/ssh/git_upload_pack_test.go | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/clients/ssh/git_upload_pack_test.go b/clients/ssh/git_upload_pack_test.go index 8626b50..66ac306 100644 --- a/clients/ssh/git_upload_pack_test.go +++ b/clients/ssh/git_upload_pack_test.go @@ -25,7 +25,7 @@ const ( ) func (s *SuiteRemote) TestConnect(c *C) { - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() c.Assert(r.Connect(fixRepo), Equals, ErrAuthRequired) } @@ -62,7 +62,7 @@ func (s *SuiteRemote) TestConnectWithPublicKeysCallback(c *C) { c.Assert(err, IsNil) defer func() { c.Assert(agent.close(), IsNil) }() - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepo, agent.auth), IsNil) defer func() { c.Assert(r.Disconnect(), IsNil) }() c.Assert(r.connected, Equals, true) @@ -70,17 +70,17 @@ func (s *SuiteRemote) TestConnectWithPublicKeysCallback(c *C) { } func (s *SuiteRemote) TestConnectBadVcs(c *C) { - r := NewGitUploadPackService(fixRepoBadVcs) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepoBadVcs, nil), ErrorMatches, fmt.Sprintf(".*%s.*", fixRepoBadVcs)) } func (s *SuiteRemote) TestConnectNonGit(c *C) { - r := NewGitUploadPackService(fixRepoNonGit) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepoNonGit, nil), Equals, ErrUnsupportedVCS) } func (s *SuiteRemote) TestConnectNonGithub(c *C) { - r := NewGitUploadPackService(fixGitRepoNonGithub) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixGitRepoNonGithub, nil), Equals, ErrUnsupportedRepo) } @@ -92,7 +92,7 @@ func (*mockAuth) Name() string { return "" } func (*mockAuth) String() string { return "" } func (s *SuiteRemote) TestConnectWithAuthWrongType(c *C) { - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepo, &mockAuth{}), Equals, ErrInvalidAuthMethod) c.Assert(r.connected, Equals, false) } @@ -102,7 +102,7 @@ func (s *SuiteRemote) TestAlreadyConnected(c *C) { c.Assert(err, IsNil) defer func() { c.Assert(agent.close(), IsNil) }() - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepo, agent.auth), IsNil) defer func() { c.Assert(r.Disconnect(), IsNil) }() c.Assert(r.ConnectWithAuth(fixRepo, agent.auth), Equals, ErrAlreadyConnected) @@ -114,14 +114,14 @@ func (s *SuiteRemote) TestDisconnect(c *C) { c.Assert(err, IsNil) defer func() { c.Assert(agent.close(), IsNil) }() - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepo, agent.auth), IsNil) c.Assert(r.Disconnect(), IsNil) c.Assert(r.connected, Equals, false) } func (s *SuiteRemote) TestDisconnectedWhenNonConnected(c *C) { - r := NewGitUploadPackService("Dear Twinkle") + r := NewGitUploadPackService() c.Assert(r.Disconnect(), Equals, ErrNotConnected) } @@ -130,7 +130,7 @@ func (s *SuiteRemote) TestAlreadyDisconnected(c *C) { c.Assert(err, IsNil) defer func() { c.Assert(agent.close(), IsNil) }() - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepo, agent.auth), IsNil) c.Assert(r.Disconnect(), IsNil) c.Assert(r.Disconnect(), Equals, ErrNotConnected) @@ -142,7 +142,7 @@ func (s *SuiteRemote) TestServeralConnections(c *C) { c.Assert(err, IsNil) defer func() { c.Assert(agent.close(), IsNil) }() - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepo, agent.auth), IsNil) c.Assert(r.Disconnect(), IsNil) @@ -158,7 +158,7 @@ func (s *SuiteRemote) TestServeralConnections(c *C) { } func (s *SuiteRemote) TestInfoNotConnected(c *C) { - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() _, err := r.Info() c.Assert(err, Equals, ErrNotConnected) } @@ -168,7 +168,7 @@ func (s *SuiteRemote) TestDefaultBranch(c *C) { c.Assert(err, IsNil) defer func() { c.Assert(agent.close(), IsNil) }() - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepo, agent.auth), IsNil) defer func() { c.Assert(r.Disconnect(), IsNil) }() @@ -182,7 +182,7 @@ func (s *SuiteRemote) TestCapabilities(c *C) { c.Assert(err, IsNil) defer func() { c.Assert(agent.close(), IsNil) }() - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepo, agent.auth), IsNil) defer func() { c.Assert(r.Disconnect(), IsNil) }() @@ -192,7 +192,7 @@ func (s *SuiteRemote) TestCapabilities(c *C) { } func (s *SuiteRemote) TestFetchNotConnected(c *C) { - r := NewGitUploadPackService("foo bar") + r := NewGitUploadPackService() pr := &common.GitUploadPackRequest{} pr.Want(core.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5")) _, err := r.Fetch(pr) @@ -204,7 +204,7 @@ func (s *SuiteRemote) TestFetch(c *C) { c.Assert(err, IsNil) defer func() { c.Assert(agent.close(), IsNil) }() - r := NewGitUploadPackService(fixRepo) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(fixRepo, agent.auth), IsNil) defer func() { c.Assert(r.Disconnect(), IsNil) }() |