Handle database test cleanup errors

This commit is contained in:
2026-06-20 18:29:08 +02:00
committed by Milas Holsting
parent bcf9d48d8e
commit c6d11d83b9

View File

@@ -13,7 +13,11 @@ func TestRunMigrationsCreatesHotPathIndexes(t *testing.T) {
if err != nil {
t.Fatalf("open sqlite: %v", err)
}
defer func() { _ = sqlDB.Close() }()
defer func() {
if err := sqlDB.Close(); err != nil {
t.Errorf("close sqlite: %v", err)
}
}()
sqlDB.SetMaxOpenConns(1)
if err := RunMigrations(sqlDB); err != nil {