fix: move dav.Service init from auth_test to user testmain
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -32,7 +32,6 @@ import (
|
||||
"crussell/auth"
|
||||
"crussell/clock"
|
||||
"crussell/db"
|
||||
"crussell/internal/dav"
|
||||
"crussell/mw"
|
||||
"crussell/testutils"
|
||||
"crussell/testutils/fixtures"
|
||||
@@ -45,7 +44,6 @@ import (
|
||||
func resetTestData(t *testing.T) (context.Context, db.Querier) {
|
||||
t.Helper()
|
||||
ctx, tx := testutils.SetupTestTx(t)
|
||||
dav.Service = &dav.BaseService{}
|
||||
return ctx, tx
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"crussell/db"
|
||||
"crussell/internal/dav"
|
||||
"crussell/testutils/jwt"
|
||||
"crussell/testutils/testdb"
|
||||
)
|
||||
@@ -16,6 +17,7 @@ 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")
|
||||
|
||||
Reference in New Issue
Block a user