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

Method TestObjectSliceIterError

plumbing/storer/object_test.go:112–122  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

110}
111
112func (s *ObjectSuite) TestObjectSliceIterError(c *C) {
113 i := NewEncodedObjectSliceIter([]plumbing.EncodedObject{
114 s.buildObject([]byte("foo")),
115 })
116
117 err := i.ForEach(func(plumbing.EncodedObject) error {
118 return fmt.Errorf("a random error")
119 })
120
121 c.Assert(err, NotNil)
122}
123
124type MockObjectStorage struct {
125 db []plumbing.EncodedObject

Callers

nothing calls this directly

Calls 3

buildObjectMethod · 0.95
ForEachMethod · 0.95

Tested by

no test coverage detected