ws and pruner done!!!

This commit is contained in:
41666 2024-10-28 13:46:52 -07:00
parent c5cc245e25
commit 74add408e6
34 changed files with 1455 additions and 221 deletions

20
util/testutil/db.go Normal file
View file

@ -0,0 +1,20 @@
package testutil
import (
"database/sql"
"testing"
_ "modernc.org/sqlite"
)
// GetTestDB standardizes what type of DB tests use.
func GetTestDB(t *testing.T) *sql.DB {
t.Helper()
db, err := sql.Open("sqlite", t.TempDir()+"/test.db")
if err != nil {
t.Fatalf("test shim: sqlite open failed, %v", err)
}
return db
}