(t *testing.T)
| 29 | } |
| 30 | |
| 31 | func 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 | |
| 50 | func TestCmdInitCreatesDBQueryable(t *testing.T) { |
| 51 | root := initTempFlowRoot(t) |
nothing calls this directly
no test coverage detected