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

Function setupFlowRoot

internal/app/add_test.go:15–22  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

13// `initTempFlowRoot` which also redirects $HOME so the skill install lands
14// inside the test sandbox.
15func 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
24func openFlowDB(t *testing.T) *sql.DB {
25 t.Helper()

Calls 2

initTempFlowRootFunction · 0.85
cmdInitFunction · 0.85

Tested by

no test coverage detected