(c *C)
| 2147 | } |
| 2148 | |
| 2149 | func (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 | |
| 2169 | func (s *RepositorySuite) TestLogFileWithOtherParamsPass(c *C) { |
| 2170 | r, _ := Init(memory.NewStorage(), nil) |
nothing calls this directly
no test coverage detected