fix: db was failing under testing
CI / Go (build + vet + test) (push) Canceled after 0s
CI / Web (build + lint) (push) Canceled after 0s

This commit is contained in:
vantablackTea
2026-09-27 20:15:38 +03:00
parent ca0aa9ee9c
commit 24184c5368
2 changed files with 24 additions and 4 deletions
@@ -26,6 +26,9 @@ func TestIntegration(t *testing.T) {
if err := db.Migrate(ctx); err != nil {
t.Fatalf("Migrate failed: %v", err)
}
if _, err := pool.Exec(ctx, "TRUNCATE users, conversations, messages, contacts, sessions RESTART IDENTITY CASCADE"); err != nil {
t.Fatalf("truncate failed: %v", err)
}
// Users
u1, err := db.CreateUser(ctx, "user1", "User One", "hash1")