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

Method TestObjectPackIdx

storage/filesystem/dotgit/dotgit_test.go:572–581  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

570}
571
572func (s *SuiteDotGit) TestObjectPackIdx(c *C) {
573 f := fixtures.Basic().ByTag(".git").One()
574 fs := f.DotGit()
575 dir := New(fs)
576
577 idx, err := dir.ObjectPackIdx(plumbing.NewHash(f.PackfileHash))
578 c.Assert(err, IsNil)
579 c.Assert(filepath.Ext(idx.Name()), Equals, ".idx")
580 c.Assert(idx.Close(), IsNil)
581}
582
583func (s *SuiteDotGit) TestObjectPackNotFound(c *C) {
584 fs := fixtures.Basic().ByTag(".git").One().DotGit()

Callers

nothing calls this directly

Calls 5

NewHashFunction · 0.92
ObjectPackIdxMethod · 0.80
NewFunction · 0.70
NameMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected