(c *C)
| 381 | } |
| 382 | |
| 383 | func (s *RemoteSuite) TestFetchWithProgress(c *C) { |
| 384 | url := s.GetBasicLocalRepositoryURL() |
| 385 | sto := memory.NewStorage() |
| 386 | buf := bytes.NewBuffer(nil) |
| 387 | |
| 388 | r := NewRemote(sto, &config.RemoteConfig{Name: "foo", URLs: []string{url}}) |
| 389 | |
| 390 | refspec := config.RefSpec("+refs/heads/*:refs/remotes/origin/*") |
| 391 | err := r.Fetch(&FetchOptions{ |
| 392 | RefSpecs: []config.RefSpec{refspec}, |
| 393 | Progress: buf, |
| 394 | }) |
| 395 | |
| 396 | c.Assert(err, IsNil) |
| 397 | c.Assert(sto.Objects, HasLen, 31) |
| 398 | |
| 399 | c.Assert(buf.Len(), Not(Equals), 0) |
| 400 | } |
| 401 | |
| 402 | type mockPackfileWriter struct { |
| 403 | storage.Storer |
nothing calls this directly
no test coverage detected