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

Method TestFetchContext

repository_test.go:1290–1302  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

1288}
1289
1290func (s *RepositorySuite) TestFetchContext(c *C) {
1291 r, _ := Init(memory.NewStorage(), nil)
1292 _, err := r.CreateRemote(&config.RemoteConfig{
1293 Name: DefaultRemoteName,
1294 URLs: []string{s.GetBasicLocalRepositoryURL()},
1295 })
1296 c.Assert(err, IsNil)
1297
1298 ctx, cancel := context.WithCancel(context.Background())
1299 cancel()
1300
1301 c.Assert(r.FetchContext(ctx, &FetchOptions{}), NotNil)
1302}
1303
1304func (s *RepositorySuite) TestCloneWithProgress(c *C) {
1305 fs := memfs.New()

Callers

nothing calls this directly

Calls 5

NewStorageFunction · 0.92
InitFunction · 0.85
CreateRemoteMethod · 0.80
FetchContextMethod · 0.45

Tested by

no test coverage detected