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