MCPcopy
hub / github.com/go-git/go-git / TestLogFileWithOtherParamsFail

Method TestLogFileWithOtherParamsFail

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

Source from the content-addressed store, hash-verified

2115}
2116
2117func (s *RepositorySuite) TestLogFileWithOtherParamsFail(c *C) {
2118 r, _ := Init(memory.NewStorage(), nil)
2119 err := r.clone(context.Background(), &CloneOptions{
2120 URL: s.GetBasicLocalRepositoryURL(),
2121 })
2122 c.Assert(err, IsNil)
2123
2124 fileName := "vendor/foo.go"
2125 cIter, err := r.Log(&LogOptions{
2126 Order: LogOrderCommitterTime,
2127 FileName: &fileName,
2128 From: plumbing.NewHash("35e85108805c84807bc66a02d91535e1e24b38b9"),
2129 })
2130 c.Assert(err, IsNil)
2131 defer cIter.Close()
2132
2133 _, iterErr := cIter.Next()
2134 c.Assert(iterErr, Equals, io.EOF)
2135}
2136
2137func (s *RepositorySuite) TestLogFileWithOtherParamsPass(c *C) {
2138 r, _ := Init(memory.NewStorage(), nil)

Callers

nothing calls this directly

Calls 8

NewStorageFunction · 0.92
NewHashFunction · 0.92
InitFunction · 0.85
cloneMethod · 0.80
LogMethod · 0.80
CloseMethod · 0.65
NextMethod · 0.65

Tested by

no test coverage detected