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

Method TestInitialize

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

Source from the content-addressed store, hash-verified

46}
47
48func (s *SuiteDotGit) TestInitialize(c *C) {
49 fs, clean := s.TemporalFilesystem()
50 defer clean()
51
52 dir := New(fs)
53
54 err := dir.Initialize()
55 c.Assert(err, IsNil)
56
57 _, err = fs.Stat(fs.Join("objects", "info"))
58 c.Assert(err, IsNil)
59
60 _, err = fs.Stat(fs.Join("objects", "pack"))
61 c.Assert(err, IsNil)
62
63 _, err = fs.Stat(fs.Join("refs", "heads"))
64 c.Assert(err, IsNil)
65
66 _, err = fs.Stat(fs.Join("refs", "tags"))
67 c.Assert(err, IsNil)
68}
69
70func (s *SuiteDotGit) TestSetRefs(c *C) {
71 fs, clean := s.TemporalFilesystem()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected