MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestCmdInitCreatesTree

Function TestCmdInitCreatesTree

internal/app/init_test.go:31–48  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29}
30
31func TestCmdInitCreatesTree(t *testing.T) {
32 root := initTempFlowRoot(t)
33
34 if rc := cmdInit(nil); rc != 0 {
35 t.Fatalf("cmdInit rc=%d", rc)
36 }
37 for _, sub := range []string{"projects", "tasks", "kb"} {
38 p := filepath.Join(root, sub)
39 info, err := os.Stat(p)
40 if err != nil {
41 t.Errorf("missing dir %s: %v", p, err)
42 continue
43 }
44 if !info.IsDir() {
45 t.Errorf("%s is not a directory", p)
46 }
47 }
48}
49
50func TestCmdInitCreatesDBQueryable(t *testing.T) {
51 root := initTempFlowRoot(t)

Callers

nothing calls this directly

Calls 2

initTempFlowRootFunction · 0.85
cmdInitFunction · 0.85

Tested by

no test coverage detected