feat: Complete DI cleanup - migrate test helpers to Database struct

- Update internal/db/test_helpers.go to use Database struct instead of globals
- Update internal/server/test_helpers.go to use TestDatabase.Pool
- Add TODO comment to old Dbpool/Ctx globals in dbHelper.go
- Remove db.Testf() usage from production code (kept for deprecated /dbtest endpoint)

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-06-01 20:06:47 +02:00
parent 2f407f6eef
commit c60f40d7e3
3 changed files with 28 additions and 14 deletions
+1
View File
@@ -20,6 +20,7 @@ import (
"go.uber.org/zap"
)
// TODO: Remove these global variables once test_helpers.go is fully migrated to use Database struct
var Dbpool *pgxpool.Pool
var Ctx = context.Background()