aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/protocol/packp/uppackresp_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-07-11 01:41:37 -0700
committerGitHub <noreply@github.com>2017-07-11 01:41:37 -0700
commit09cd5ccfd384be79e8c49d0d0bccd22589098809 (patch)
tree5c8537c62e7a5fb35c57cd572aa25f9f55f54441 /plumbing/protocol/packp/uppackresp_test.go
parent6b69a1630b30c41f4563fd95aca1d647ba611adf (diff)
parenta3dc077738fc55629f22e4effd389385a49f68cc (diff)
downloadgo-git-09cd5ccfd384be79e8c49d0d0bccd22589098809.tar.gz
Merge pull request #469 from mcuadros/fix-multiple-ack
plumbing: protocol, fix handling multiple ACK on upload-pack
Diffstat (limited to 'plumbing/protocol/packp/uppackresp_test.go')
-rw-r--r--plumbing/protocol/packp/uppackresp_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/plumbing/protocol/packp/uppackresp_test.go b/plumbing/protocol/packp/uppackresp_test.go
index c27fdda..789444d 100644
--- a/plumbing/protocol/packp/uppackresp_test.go
+++ b/plumbing/protocol/packp/uppackresp_test.go
@@ -15,7 +15,7 @@ type UploadPackResponseSuite struct{}
var _ = Suite(&UploadPackResponseSuite{})
func (s *UploadPackResponseSuite) TestDecodeNAK(c *C) {
- raw := "0008NAK\n[PACK]"
+ raw := "0008NAK\nPACK"
req := NewUploadPackRequest()
res := NewUploadPackResponse(req)
@@ -26,11 +26,11 @@ func (s *UploadPackResponseSuite) TestDecodeNAK(c *C) {
pack, err := ioutil.ReadAll(res)
c.Assert(err, IsNil)
- c.Assert(pack, DeepEquals, []byte("[PACK]"))
+ c.Assert(pack, DeepEquals, []byte("PACK"))
}
func (s *UploadPackResponseSuite) TestDecodeDepth(c *C) {
- raw := "00000008NAK\n[PACK]"
+ raw := "00000008NAK\nPACK"
req := NewUploadPackRequest()
req.Depth = DepthCommits(1)
@@ -43,11 +43,11 @@ func (s *UploadPackResponseSuite) TestDecodeDepth(c *C) {
pack, err := ioutil.ReadAll(res)
c.Assert(err, IsNil)
- c.Assert(pack, DeepEquals, []byte("[PACK]"))
+ c.Assert(pack, DeepEquals, []byte("PACK"))
}
func (s *UploadPackResponseSuite) TestDecodeMalformed(c *C) {
- raw := "00000008ACK\n[PACK]"
+ raw := "00000008ACK\nPACK"
req := NewUploadPackRequest()
req.Depth = DepthCommits(1)
@@ -96,7 +96,7 @@ func (s *UploadPackResponseSuite) TestEncodeNAK(c *C) {
}
func (s *UploadPackResponseSuite) TestEncodeDepth(c *C) {
- pf := ioutil.NopCloser(bytes.NewBuffer([]byte("[PACK]")))
+ pf := ioutil.NopCloser(bytes.NewBuffer([]byte("PACK")))
req := NewUploadPackRequest()
req.Depth = DepthCommits(1)
@@ -106,7 +106,7 @@ func (s *UploadPackResponseSuite) TestEncodeDepth(c *C) {
b := bytes.NewBuffer(nil)
c.Assert(res.Encode(b), IsNil)
- expected := "00000008NAK\n[PACK]"
+ expected := "00000008NAK\nPACK"
c.Assert(string(b.Bytes()), Equals, expected)
}