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

Method TestLogFileWithOtherParamsFail

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

Source from the content-addressed store, hash-verified

2147}
2148
2149func (s *RepositorySuite) TestLogFileWithOtherParamsFail(c *C) {
2150 r, _ := Init(memory.NewStorage(), nil)
2151 err := r.clone(context.Background(), &CloneOptions{
2152 URL: s.GetBasicLocalRepositoryURL(),
2153 })
2154 c.Assert(err, IsNil)
2155
2156 fileName := "vendor/foo.go"
2157 cIter, err := r.Log(&LogOptions{
2158 Order: LogOrderCommitterTime,
2159 FileName: &fileName,
2160 From: plumbing.NewHash("35e85108805c84807bc66a02d91535e1e24b38b9"),
2161 })
2162 c.Assert(err, IsNil)
2163 defer cIter.Close()
2164
2165 _, iterErr := cIter.Next()
2166 c.Assert(iterErr, Equals, io.EOF)
2167}
2168
2169func (s *RepositorySuite) TestLogFileWithOtherParamsPass(c *C) {
2170 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