• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

golang-migrate / migrate / 24640136570

19 Apr 2026 09:58PM UTC coverage: 56.328% (+1.9%) from 54.432%
24640136570

Pull #1394

github

joschi
fix: address second round of Copilot review comments

- README.md: fix db.system → db.system.name in database span table
- otel.go: call otel.Handle(err) on instrument creation errors instead
  of silently discarding them (doc comment already promised this)
- migrate.go: use attribute.Int64 for uint version fields to avoid
  int overflow on 32-bit platforms
- migrate.go: sanitize database.Error in otelSpanSetError to avoid
  leaking migration SQL into trace span status descriptions
- database/oteldriver.go: same SQL-leak fix in endSpan; add errors import
- source/oteldriver.go: use attribute.Int64 for uint version fields
- source/oteldriver_test.go: assert span.Status().Code != codes.Error
  directly rather than comparing full sdktrace.Status struct
- source/pkger/pkger.go: fix import grouping (stdlib before third-party)
- source/google_cloud_storage/storage.go: merge context into stdlib group

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pull Request #1394: feat: OpenTelemetry instrumentation

1020 of 1236 new or added lines in 47 files covered. (82.52%)

8 existing lines in 7 files now uncovered.

4731 of 8399 relevant lines covered (56.33%)

50.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/database/testing/migrate_testing.go
1
// Package testing has the database tests.
2
// All database drivers must pass the Test function.
3
// This lives in it's own package so it stays a test dependency.
4
package testing
5

6
import (
7
        "context"
8
        "testing"
9
)
10

11
import (
12
        "github.com/golang-migrate/migrate/v4"
13
)
14

15
// TestMigrate runs integration-tests between the Migrate layer and database implementations.
16
func TestMigrate(t *testing.T, m *migrate.Migrate) {
×
17
        TestMigrateUp(t, m)
×
18
        TestMigrateDrop(t, m)
×
19
}
×
20

21
// Regression test for preventing a regression for #164 https://github.com/golang-migrate/migrate/pull/173
22
// Similar to TestDrop(), but tests the dropping mechanism through the Migrate logic instead, to check for
23
// double-locking during the Drop logic.
24
func TestMigrateDrop(t *testing.T, m *migrate.Migrate) {
×
NEW
25
        if err := m.Drop(context.Background()); err != nil {
×
26
                t.Fatal(err)
×
27
        }
×
28
}
29

30
func TestMigrateUp(t *testing.T, m *migrate.Migrate) {
×
31
        t.Log("UP")
×
NEW
32
        if err := m.Up(context.Background()); err != nil {
×
33
                t.Fatal(err)
×
34
        }
×
35
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc