MCPcopy
hub / github.com/redspread/spread / checkProject

Function checkProject

pkg/project/project_test.go:52–67  ·  view source on GitHub ↗
(t *testing.T, target string)

Source from the content-addressed store, hash-verified

50}
51
52func checkProject(t *testing.T, target string) {
53 // check that project directory was created
54 checkPath(t, target, true)
55
56 // check .gitignore
57 ignorePath := filepath.Join(target, ".gitignore")
58 checkPath(t, ignorePath, false)
59
60 // check git directory
61 gitDir := filepath.Join(target, GitDirectory)
62 checkPath(t, gitDir, true)
63 repo, err := git.OpenRepository(gitDir)
64 assert.NoError(t, err)
65
66 assert.True(t, filepath.Clean(repo.Path()) == gitDir)
67}
68
69// checkPath determines if a path has been created.
70// The test errors if it doesn't exist or doesn't match dir.

Callers 2

TestInitProjectRelativeFunction · 0.85
TestInitProjectAbsoluteFunction · 0.85

Calls 2

checkPathFunction · 0.85
PathMethod · 0.80

Tested by

no test coverage detected