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

Method TestIterLargeObjectThreshold

storage/filesystem/object_test.go:251–268  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

249}
250
251func (s *FsSuite) TestIterLargeObjectThreshold(c *C) {
252 fixtures.ByTag(".git").ByTag("packfile").Test(c, func(f *fixtures.Fixture) {
253 fs := f.DotGit()
254 o := NewObjectStorageWithOptions(dotgit.New(fs), cache.NewObjectLRUDefault(), Options{LargeObjectThreshold: 1})
255
256 iter, err := o.IterEncodedObjects(plumbing.AnyObject)
257 c.Assert(err, IsNil)
258
259 var count int32
260 err = iter.ForEach(func(o plumbing.EncodedObject) error {
261 count++
262 return nil
263 })
264
265 c.Assert(err, IsNil)
266 c.Assert(count, Equals, f.ObjectsCount)
267 })
268}
269
270func (s *FsSuite) TestIterWithType(c *C) {
271 fixtures.ByTag(".git").Test(c, func(f *fixtures.Fixture) {

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
NewObjectLRUDefaultFunction · 0.92
IterEncodedObjectsMethod · 0.65
ForEachMethod · 0.65

Tested by

no test coverage detected