minor changes and linter

This commit is contained in:
crn4
2025-10-31 16:06:35 +01:00
parent ee7bda446d
commit 7c387b65ed
2 changed files with 7 additions and 3 deletions

View File

@@ -238,8 +238,6 @@ func connectDBforTest(ctx context.Context, dsn string) (*pgxpool.Pool, error) {
pool.Close()
return nil, fmt.Errorf("unable to ping database: %w", err)
}
fmt.Println("Successfully connected to the database!")
return pool, nil
}
@@ -269,7 +267,10 @@ func setupBenchmarkDB(b testing.TB) (*SqlStore, func(), string) {
}
for i := len(models) - 1; i >= 0; i-- {
db.Migrator().DropTable(models[i])
err := db.Migrator().DropTable(models[i])
if err != nil {
b.Fatalf("failed to drop table: %v", err)
}
}
err = db.AutoMigrate(models...)