From 30c9012562041d9a9cabb971956ed289dcb8673c Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Sun, 5 Jul 2026 20:08:09 +0100 Subject: [PATCH] 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 --- backend/handlers/auth/auth_test.go | 2 -- backend/handlers/user/testmain_test.go | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/handlers/auth/auth_test.go b/backend/handlers/auth/auth_test.go index 1518f96..537bbbd 100644 --- a/backend/handlers/auth/auth_test.go +++ b/backend/handlers/auth/auth_test.go @@ -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 } diff --git a/backend/handlers/user/testmain_test.go b/backend/handlers/user/testmain_test.go index eb517ad..169b90d 100644 --- a/backend/handlers/user/testmain_test.go +++ b/backend/handlers/user/testmain_test.go @@ -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")