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

Function checkPath

pkg/project/project_test.go:71–76  ·  view source on GitHub ↗

checkPath determines if a path has been created. The test errors if it doesn't exist or doesn't match dir.

(t *testing.T, target string, dir bool)

Source from the content-addressed store, hash-verified

69// checkPath determines if a path has been created.
70// The test errors if it doesn't exist or doesn't match dir.
71func checkPath(t *testing.T, target string, dir bool) {
72 fileInfo, err := os.Stat(target)
73 if assert.NoError(t, err) {
74 assert.True(t, fileInfo.IsDir() == dir, "should have created directory at %s", target)
75 }
76}

Callers 1

checkProjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected