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

Method TestInitialize

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

Source from the content-addressed store, hash-verified

74}
75
76func (s *SuiteDotGit) TestInitialize(c *C) {
77 fs := s.TemporalFilesystem(c)
78
79 dir := New(fs)
80
81 err := dir.Initialize()
82 c.Assert(err, IsNil)
83
84 _, err = fs.Stat(fs.Join("objects", "info"))
85 c.Assert(err, IsNil)
86
87 _, err = fs.Stat(fs.Join("objects", "pack"))
88 c.Assert(err, IsNil)
89
90 _, err = fs.Stat(fs.Join("refs", "heads"))
91 c.Assert(err, IsNil)
92
93 _, err = fs.Stat(fs.Join("refs", "tags"))
94 c.Assert(err, IsNil)
95}
96
97func (s *SuiteDotGit) TestSetRefs(c *C) {
98 fs := s.TemporalFilesystem(c)

Callers

nothing calls this directly

Calls 5

TemporalFilesystemMethod · 0.95
InitializeMethod · 0.80
JoinMethod · 0.80
NewFunction · 0.70
StatMethod · 0.65

Tested by

no test coverage detected