fix: use QueryRowContext in test to fix noctx lint

This commit is contained in:
2026-06-11 14:48:51 +02:00
parent 3d13cf9be8
commit 6ba387bb6a

View File

@@ -1,6 +1,7 @@
package database
import (
"context"
"database/sql"
"testing"
@@ -28,7 +29,7 @@ func TestRunMigrationsCreatesHotPathIndexes(t *testing.T) {
} {
t.Run(indexName, func(t *testing.T) {
var count int
err := sqlDB.QueryRow(`SELECT COUNT(*) FROM sqlite_master WHERE type = 'index' AND name = ?`, indexName).Scan(&count)
err := sqlDB.QueryRowContext(context.Background(), `SELECT COUNT(*) FROM sqlite_master WHERE type = 'index' AND name = ?`, indexName).Scan(&count)
if err != nil {
t.Fatalf("query index: %v", err)
}