(c *C)
| 347 | } |
| 348 | |
| 349 | func (s *RemoteSuite) TestFetchWithProgress(c *C) { |
| 350 | url := s.GetBasicLocalRepositoryURL() |
| 351 | sto := memory.NewStorage() |
| 352 | buf := bytes.NewBuffer(nil) |
| 353 | |
| 354 | r := NewRemote(sto, &config.RemoteConfig{Name: "foo", URLs: []string{url}}) |
| 355 | |
| 356 | refspec := config.RefSpec("+refs/heads/*:refs/remotes/origin/*") |
| 357 | err := r.Fetch(&FetchOptions{ |
| 358 | RefSpecs: []config.RefSpec{refspec}, |
| 359 | Progress: buf, |
| 360 | }) |
| 361 | |
| 362 | c.Assert(err, IsNil) |
| 363 | c.Assert(sto.Objects, HasLen, 31) |
| 364 | |
| 365 | c.Assert(buf.Len(), Not(Equals), 0) |
| 366 | } |
| 367 | |
| 368 | type mockPackfileWriter struct { |
| 369 | storage.Storer |
nothing calls this directly
no test coverage detected