(c *C)
| 204 | } |
| 205 | |
| 206 | func (s *RemoteSuite) TestFetchNonExistentReference(c *C) { |
| 207 | r := NewRemote(memory.NewStorage(), &config.RemoteConfig{ |
| 208 | URLs: []string{s.GetLocalRepositoryURL(fixtures.ByTag("tags").One())}, |
| 209 | }) |
| 210 | |
| 211 | err := r.Fetch(&FetchOptions{ |
| 212 | RefSpecs: []config.RefSpec{ |
| 213 | config.RefSpec("+refs/heads/foo:refs/remotes/origin/foo"), |
| 214 | }, |
| 215 | }) |
| 216 | |
| 217 | c.Assert(err, ErrorMatches, "couldn't find remote ref.*") |
| 218 | c.Assert(errors.Is(err, NoMatchingRefSpecError{}), Equals, true) |
| 219 | } |
| 220 | |
| 221 | func (s *RemoteSuite) TestFetchContext(c *C) { |
| 222 | r := NewRemote(memory.NewStorage(), &config.RemoteConfig{ |
nothing calls this directly
no test coverage detected