MCPcopy Create free account
hub / github.com/go-git/go-git / TestHashNotFound

Method TestHashNotFound

plumbing/format/packfile/encoder_test.go:86–91  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

84}
85
86func (s *EncoderSuite) TestHashNotFound(c *C) {
87 h, err := s.enc.Encode([]plumbing.Hash{plumbing.NewHash("BAD")}, 10)
88 c.Assert(h, Equals, plumbing.ZeroHash)
89 c.Assert(err, NotNil)
90 c.Assert(err, Equals, plumbing.ErrObjectNotFound)
91}
92
93func (s *EncoderSuite) TestDecodeEncodeWithDeltaDecodeREF(c *C) {
94 s.enc = NewEncoder(s.buf, s.store, true)

Callers

nothing calls this directly

Calls 2

NewHashFunction · 0.92
EncodeMethod · 0.65

Tested by

no test coverage detected