Refactor db package logging
This commit is contained in:
@@ -2,6 +2,7 @@ package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -20,7 +21,7 @@ func TestSchema(t *testing.T) {
|
||||
testInitialVersion(t, ctx, db)
|
||||
})
|
||||
|
||||
if err := db.ApplySchema(ctx, nil); err != nil {
|
||||
if err := db.ApplySchema(ctx, slog.Default()); err != nil {
|
||||
t.Fatalf("ApplySchema: %v", err)
|
||||
}
|
||||
|
||||
@@ -92,7 +93,7 @@ func testTablesExist(t *testing.T, ctx context.Context, db *SQLite) {
|
||||
|
||||
func testSchemaIdempotent(t *testing.T, ctx context.Context, db *SQLite) {
|
||||
// Apply schema again; should succeed without error.
|
||||
if err := db.ApplySchema(ctx, nil); err != nil {
|
||||
if err := db.ApplySchema(ctx, slog.Default()); err != nil {
|
||||
t.Fatalf("second ApplySchema: %v", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user