Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
26 lines
472 B
Go
26 lines
472 B
Go
//go:build test
|
|
// +build test
|
|
|
|
package user
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"crussell/db"
|
|
"crussell/internal/dav"
|
|
"crussell/testutils/jwt"
|
|
"crussell/testutils/testdb"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
pool := testdb.CreateTestDatabase("crussell_test_handlers_user")
|
|
db.Conn = db.NewPoolProxy(pool)
|
|
jwt.Init()
|
|
dav.Service = &dav.BaseService{}
|
|
testdb.SeedBaseline(pool)
|
|
code := m.Run()
|
|
testdb.DestroyTestDatabase(pool, "crussell_test_handlers_user")
|
|
os.Exit(code)
|
|
}
|