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

Method SetUpTest

submodule_test.go:25–40  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

23var _ = Suite(&SubmoduleSuite{})
24
25func (s *SubmoduleSuite) SetUpTest(c *C) {
26 path := fixtures.ByTag("submodule").One().Worktree().Root()
27
28 var dir string
29 dir, s.clean = s.TemporalDir()
30
31 r, err := PlainClone(filepath.Join(dir, "worktree"), false, &CloneOptions{
32 URL: path,
33 })
34
35 c.Assert(err, IsNil)
36
37 s.Repository = r
38 s.Worktree, err = r.Worktree()
39 c.Assert(err, IsNil)
40}
41
42func (s *SubmoduleSuite) TearDownTest(_ *C) {
43 s.clean()

Callers

nothing calls this directly

Calls 5

PlainCloneFunction · 0.85
RootMethod · 0.80
WorktreeMethod · 0.80
TemporalDirMethod · 0.80
JoinMethod · 0.80

Tested by

no test coverage detected