Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Partial fetch using http protocol #216

Closed
ajnavarro opened this issue Jan 18, 2017 · 0 comments
Closed

Partial fetch using http protocol #216

ajnavarro opened this issue Jan 18, 2017 · 0 comments
Labels

Comments

@ajnavarro
Copy link
Contributor

ajnavarro commented Jan 18, 2017

Partial fetch is working in file and git protocols, but adding this test into plumbing/transport/test/upload_pack.go file:

func (s *UploadPackSuite) TestUploadPackPartial(c *C) {
	r, err := s.Client.NewUploadPackSession(s.Endpoint, s.EmptyAuth)
	c.Assert(err, IsNil)
	defer func() { c.Assert(r.Close(), IsNil) }()

	req := packp.NewUploadPackRequest()
	req.Wants = append(req.Wants, plumbing.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5"))
	req.Haves = append(req.Haves, plumbing.NewHash("918c48b83bd081e863dbe1b80f8998f058cd8294"))

	reader, err := r.UploadPack(req)
	c.Assert(err, IsNil)

	s.checkObjectNumber(c, reader, 4)
}

It fails when plumbing/transport/http/upload_pack_test.go is executed:

FAIL: <autogenerated>:21: UploadPackSuite.TestUploadPackPartial

/plumbing/transport/test/upload_pack.go:210:
    c.Assert(err, IsNil)
... value *packfile.Error = &packfile.Error{reason:"empty packfile", details:""} ("empty packfile")
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant