aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/server
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/transport/server')
-rw-r--r--plumbing/transport/server/receive_pack_test.go2
-rw-r--r--plumbing/transport/server/server.go4
-rw-r--r--plumbing/transport/server/upload_pack_test.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/plumbing/transport/server/receive_pack_test.go b/plumbing/transport/server/receive_pack_test.go
index 2c4036a..73ba60b 100644
--- a/plumbing/transport/server/receive_pack_test.go
+++ b/plumbing/transport/server/receive_pack_test.go
@@ -34,7 +34,7 @@ func (s *ReceivePackSuite) TestSendPackAddDeleteReference(c *C) {
// Overwritten, server returns error earlier.
func (s *ReceivePackSuite) TestAdvertisedReferencesNotExists(c *C) {
- r, err := s.Client.NewReceivePackSession(s.NonExistentEndpoint)
+ r, err := s.Client.NewReceivePackSession(s.NonExistentEndpoint, s.EmptyAuth)
c.Assert(err, Equals, transport.ErrRepositoryNotFound)
c.Assert(r, IsNil)
}
diff --git a/plumbing/transport/server/server.go b/plumbing/transport/server/server.go
index 6787e9d..542b439 100644
--- a/plumbing/transport/server/server.go
+++ b/plumbing/transport/server/server.go
@@ -30,7 +30,7 @@ func NewServer(loader Loader) transport.Transport {
return &server{loader, &handler{}}
}
-func (s *server) NewUploadPackSession(ep transport.Endpoint) (transport.UploadPackSession, error) {
+func (s *server) NewUploadPackSession(ep transport.Endpoint, auth transport.AuthMethod) (transport.UploadPackSession, error) {
sto, err := s.loader.Load(ep)
if err != nil {
return nil, err
@@ -39,7 +39,7 @@ func (s *server) NewUploadPackSession(ep transport.Endpoint) (transport.UploadPa
return s.handler.NewUploadPackSession(sto)
}
-func (s *server) NewReceivePackSession(ep transport.Endpoint) (transport.ReceivePackSession, error) {
+func (s *server) NewReceivePackSession(ep transport.Endpoint, auth transport.AuthMethod) (transport.ReceivePackSession, error) {
sto, err := s.loader.Load(ep)
if err != nil {
return nil, err
diff --git a/plumbing/transport/server/upload_pack_test.go b/plumbing/transport/server/upload_pack_test.go
index 8919e8e..137f887 100644
--- a/plumbing/transport/server/upload_pack_test.go
+++ b/plumbing/transport/server/upload_pack_test.go
@@ -25,7 +25,7 @@ func (s *UploadPackSuite) SetUpTest(c *C) {
// Overwritten, it's not an error in server-side.
func (s *UploadPackSuite) TestAdvertisedReferencesEmpty(c *C) {
- r, err := s.Client.NewUploadPackSession(s.EmptyEndpoint)
+ r, err := s.Client.NewUploadPackSession(s.EmptyEndpoint, s.EmptyAuth)
c.Assert(err, IsNil)
ar, err := r.AdvertisedReferences()
c.Assert(err, IsNil)
@@ -34,7 +34,7 @@ func (s *UploadPackSuite) TestAdvertisedReferencesEmpty(c *C) {
// Overwritten, server returns error earlier.
func (s *UploadPackSuite) TestAdvertisedReferencesNotExists(c *C) {
- r, err := s.Client.NewUploadPackSession(s.NonExistentEndpoint)
+ r, err := s.Client.NewUploadPackSession(s.NonExistentEndpoint, s.EmptyAuth)
c.Assert(err, Equals, transport.ErrRepositoryNotFound)
c.Assert(r, IsNil)
}