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

Method TestLogFileWithError

repository_test.go:2202–2211  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

2200func (m *mockErrCommitIter) Close() {}
2201
2202func (s *RepositorySuite) TestLogFileWithError(c *C) {
2203 fileName := "README"
2204 cIter := object.NewCommitFileIterFromIter(fileName, &mockErrCommitIter{}, false)
2205 defer cIter.Close()
2206
2207 err := cIter.ForEach(func(commit *object.Commit) error {
2208 return nil
2209 })
2210 c.Assert(err, NotNil)
2211}
2212
2213func (s *RepositorySuite) TestLogPathWithError(c *C) {
2214 fileName := "README"

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.65
ForEachMethod · 0.65

Tested by

no test coverage detected