INNER CODE UNIT · Go
TestGetAuditDataWithClosedConnections
simagix/hatchet · audit_test.go:27
func TestGetAuditDataWithClosedConnections(t *testing.T) {
// Create a temporary database
tmpDir := os.TempDir()
dbfile := filepath.Join(tmpDir, "test_audit.db")
defer os.Remove(dbfile)
hatchetName := "test_hatchet"
sqlite, err := NewSQLite3DB(dbfile, hatchetName, 2000)
if err != nil {
t.Fatal(err)
}
defer sqlite.Close()
// Begin transaction and create tables
if err = sqlite.Begin(); err != nil {
t.Fatal(err)
}