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

Method TestIterLargeObjectThreshold

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

Source from the content-addressed store, hash-verified

215}
216
217func (s *FsSuite) TestIterLargeObjectThreshold(c *C) {
218 fixtures.ByTag(".git").ByTag("packfile").Test(c, func(f *fixtures.Fixture) {
219 fs := f.DotGit()
220 o := NewObjectStorageWithOptions(dotgit.New(fs), cache.NewObjectLRUDefault(), Options{LargeObjectThreshold: 1})
221
222 iter, err := o.IterEncodedObjects(plumbing.AnyObject)
223 c.Assert(err, IsNil)
224
225 var count int32
226 err = iter.ForEach(func(o plumbing.EncodedObject) error {
227 count++
228 return nil
229 })
230
231 c.Assert(err, IsNil)
232 c.Assert(count, Equals, f.ObjectsCount)
233 })
234}
235
236func (s *FsSuite) TestIterWithType(c *C) {
237 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