aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/test
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/transport/test')
-rw-r--r--plumbing/transport/test/receive_pack.go18
-rw-r--r--plumbing/transport/test/upload_pack.go6
2 files changed, 12 insertions, 12 deletions
diff --git a/plumbing/transport/test/receive_pack.go b/plumbing/transport/test/receive_pack.go
index d29d9ca..0f3352c 100644
--- a/plumbing/transport/test/receive_pack.go
+++ b/plumbing/transport/test/receive_pack.go
@@ -9,7 +9,6 @@ import (
"io"
"io/ioutil"
- "github.com/src-d/go-git-fixtures"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/format/packfile"
"gopkg.in/src-d/go-git.v4/plumbing/protocol/packp"
@@ -18,12 +17,13 @@ import (
"gopkg.in/src-d/go-git.v4/storage/memory"
. "gopkg.in/check.v1"
+ "gopkg.in/src-d/go-git-fixtures.v3"
)
type ReceivePackSuite struct {
- Endpoint transport.Endpoint
- EmptyEndpoint transport.Endpoint
- NonExistentEndpoint transport.Endpoint
+ Endpoint *transport.Endpoint
+ EmptyEndpoint *transport.Endpoint
+ NonExistentEndpoint *transport.Endpoint
EmptyAuth transport.AuthMethod
Client transport.Transport
}
@@ -213,7 +213,7 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatusWithError(c *C)
s.checkRemoteHead(c, endpoint, fixture.Head)
}
-func (s *ReceivePackSuite) receivePackNoCheck(c *C, ep transport.Endpoint,
+func (s *ReceivePackSuite) receivePackNoCheck(c *C, ep *transport.Endpoint,
req *packp.ReferenceUpdateRequest, fixture *fixtures.Fixture,
callAdvertisedReferences bool) (*packp.ReportStatus, error) {
url := ""
@@ -245,7 +245,7 @@ func (s *ReceivePackSuite) receivePackNoCheck(c *C, ep transport.Endpoint,
return r.ReceivePack(context.Background(), req)
}
-func (s *ReceivePackSuite) receivePack(c *C, ep transport.Endpoint,
+func (s *ReceivePackSuite) receivePack(c *C, ep *transport.Endpoint,
req *packp.ReferenceUpdateRequest, fixture *fixtures.Fixture,
callAdvertisedReferences bool) {
@@ -269,11 +269,11 @@ func (s *ReceivePackSuite) receivePack(c *C, ep transport.Endpoint,
}
}
-func (s *ReceivePackSuite) checkRemoteHead(c *C, ep transport.Endpoint, head plumbing.Hash) {
+func (s *ReceivePackSuite) checkRemoteHead(c *C, ep *transport.Endpoint, head plumbing.Hash) {
s.checkRemoteReference(c, ep, "refs/heads/master", head)
}
-func (s *ReceivePackSuite) checkRemoteReference(c *C, ep transport.Endpoint,
+func (s *ReceivePackSuite) checkRemoteReference(c *C, ep *transport.Endpoint,
refName string, head plumbing.Hash) {
r, err := s.Client.NewUploadPackSession(ep, s.EmptyAuth)
@@ -348,7 +348,7 @@ func (s *ReceivePackSuite) testSendPackDeleteReference(c *C) {
func (s *ReceivePackSuite) emptyPackfile() io.ReadCloser {
var buf bytes.Buffer
e := packfile.NewEncoder(&buf, memory.NewStorage(), false)
- _, err := e.Encode(nil)
+ _, err := e.Encode(nil, 10)
if err != nil {
panic(err)
}
diff --git a/plumbing/transport/test/upload_pack.go b/plumbing/transport/test/upload_pack.go
index b3acc4f..70e4e56 100644
--- a/plumbing/transport/test/upload_pack.go
+++ b/plumbing/transport/test/upload_pack.go
@@ -21,9 +21,9 @@ import (
)
type UploadPackSuite struct {
- Endpoint transport.Endpoint
- EmptyEndpoint transport.Endpoint
- NonExistentEndpoint transport.Endpoint
+ Endpoint *transport.Endpoint
+ EmptyEndpoint *transport.Endpoint
+ NonExistentEndpoint *transport.Endpoint
EmptyAuth transport.AuthMethod
Client transport.Transport
}