MCPcopy Create free account
hub / github.com/go-git/go-git / TestPullProgress

Method TestPullProgress

worktree_test.go:201–219  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

199}
200
201func (s *WorktreeSuite) TestPullProgress(c *C) {
202 r, _ := Init(memory.NewStorage(), memfs.New())
203
204 r.CreateRemote(&config.RemoteConfig{
205 Name: DefaultRemoteName,
206 URLs: []string{s.GetBasicLocalRepositoryURL()},
207 })
208
209 w, err := r.Worktree()
210 c.Assert(err, IsNil)
211
212 buf := bytes.NewBuffer(nil)
213 err = w.Pull(&PullOptions{
214 Progress: buf,
215 })
216
217 c.Assert(err, IsNil)
218 c.Assert(buf.Len(), Not(Equals), 0)
219}
220
221func (s *WorktreeSuite) TestPullProgressWithRecursion(c *C) {
222 if testing.Short() {

Callers

nothing calls this directly

Calls 7

NewStorageFunction · 0.92
InitFunction · 0.85
CreateRemoteMethod · 0.80
WorktreeMethod · 0.80
PullMethod · 0.80
LenMethod · 0.45

Tested by

no test coverage detected