setupFlowRoot sets up a tempdir FLOW_ROOT and runs cmdInit to create the DB + tree. Returns the root path. Uses the init-test helper `initTempFlowRoot` which also redirects $HOME so the skill install lands inside the test sandbox.
(t *testing.T)
| 13 | // `initTempFlowRoot` which also redirects $HOME so the skill install lands |
| 14 | // inside the test sandbox. |
| 15 | func setupFlowRoot(t *testing.T) string { |
| 16 | t.Helper() |
| 17 | root := initTempFlowRoot(t) |
| 18 | if rc := cmdInit(nil); rc != 0 { |
| 19 | t.Fatalf("cmdInit rc=%d", rc) |
| 20 | } |
| 21 | return root |
| 22 | } |
| 23 | |
| 24 | func openFlowDB(t *testing.T) *sql.DB { |
| 25 | t.Helper() |
no test coverage detected