Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
27 lines
353 B
Go
27 lines
353 B
Go
//go:build test
|
|
// +build test
|
|
|
|
package admin
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"crussell/db"
|
|
"crussell/testutils/jwt"
|
|
"crussell/testutils/testdb"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
pool, err := testdb.NewPool("")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
testdb.Migrate(&testing.T{}, pool)
|
|
db.DB = pool
|
|
jwt.Init()
|
|
code := m.Run()
|
|
pool.Close()
|
|
os.Exit(code)
|
|
}
|