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/http | |
parent | 35ee4d749be21691b78a7465361ad47179fe2eff (diff) | |
download | go-git-d0155564148550167e756e440b5f9ce71c76abb3.tar.gz |
clients: removing url from the clients constructor
Diffstat (limited to 'clients/http')
-rw-r--r-- | clients/http/git_upload_pack.go | 3 | ||||
-rw-r--r-- | clients/http/git_upload_pack_test.go | 12 |
2 files changed, 7 insertions, 8 deletions
diff --git a/clients/http/git_upload_pack.go b/clients/http/git_upload_pack.go index 4b06c72..2d38d42 100644 --- a/clients/http/git_upload_pack.go +++ b/clients/http/git_upload_pack.go @@ -18,8 +18,7 @@ type GitUploadPackService struct { auth HTTPAuthMethod } -func NewGitUploadPackService(url string) *GitUploadPackService { - // url ignored +func NewGitUploadPackService() *GitUploadPackService { return &GitUploadPackService{ Client: http.DefaultClient, } diff --git a/clients/http/git_upload_pack_test.go b/clients/http/git_upload_pack_test.go index b479155..f9ec424 100644 --- a/clients/http/git_upload_pack_test.go +++ b/clients/http/git_upload_pack_test.go @@ -15,13 +15,13 @@ var _ = Suite(&SuiteRemote{}) const RepositoryFixture = "https://github.com/tyba/git-fixture" func (s *SuiteRemote) TestConnect(c *C) { - r := NewGitUploadPackService(RepositoryFixture) + r := NewGitUploadPackService() c.Assert(r.Connect(RepositoryFixture), IsNil) } func (s *SuiteRemote) TestConnectWithAuth(c *C) { auth := &BasicAuth{} - r := NewGitUploadPackService(RepositoryFixture) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(RepositoryFixture, auth), IsNil) c.Assert(r.auth, Equals, auth) } @@ -32,12 +32,12 @@ func (*mockAuth) Name() string { return "" } func (*mockAuth) String() string { return "" } func (s *SuiteRemote) TestConnectWithAuthWrongType(c *C) { - r := NewGitUploadPackService(RepositoryFixture) + r := NewGitUploadPackService() c.Assert(r.ConnectWithAuth(RepositoryFixture, &mockAuth{}), Equals, InvalidAuthMethodErr) } func (s *SuiteRemote) TestDefaultBranch(c *C) { - r := NewGitUploadPackService(RepositoryFixture) + r := NewGitUploadPackService() c.Assert(r.Connect(RepositoryFixture), IsNil) info, err := r.Info() @@ -46,7 +46,7 @@ func (s *SuiteRemote) TestDefaultBranch(c *C) { } func (s *SuiteRemote) TestCapabilities(c *C) { - r := NewGitUploadPackService(RepositoryFixture) + r := NewGitUploadPackService() c.Assert(r.Connect(RepositoryFixture), IsNil) info, err := r.Info() @@ -55,7 +55,7 @@ func (s *SuiteRemote) TestCapabilities(c *C) { } func (s *SuiteRemote) TestFetch(c *C) { - r := NewGitUploadPackService(RepositoryFixture) + r := NewGitUploadPackService() c.Assert(r.Connect(RepositoryFixture), IsNil) req := &common.GitUploadPackRequest{} |