Files
Crussell/backend/handlers/scheduling/testmain_test.go
T
2026-06-18 16:26:39 +01:00

27 lines
358 B
Go

//go:build test
// +build test
package scheduling
import (
"os"
"testing"
"crussell/db"
"crussell/testutils/jwt"
"crussell/testutils/testdb"
)
func TestMain(m *testing.M) {
pool, err := testdb.NewPool("")
if err != nil {
os.Exit(1)
}
testdb.Migrate(&testing.T{}, pool)
db.DB = pool
jwt.Init()
code := m.Run()
pool.Close()
os.Exit(code)
}