MCPcopy
hub / github.com/go-git/go-git / TestPullProgress

Method TestPullProgress

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

Source from the content-addressed store, hash-verified

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