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

Function openTempDB

internal/flowdb/db_test.go:10–19  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func openTempDB(t *testing.T) *sql.DB {
11 t.Helper()
12 path := filepath.Join(t.TempDir(), "flow.db")
13 db, err := OpenDB(path)
14 if err != nil {
15 t.Fatalf("OpenDB: %v", err)
16 }
17 t.Cleanup(func() { db.Close() })
18 return db
19}
20
21func insertProject(t *testing.T, db *sql.DB, slug, name, wd, priority string) {
22 t.Helper()

Calls 1

OpenDBFunction · 0.85

Tested by

no test coverage detected