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

golang-migrate / migrate / 24639605245

19 Apr 2026 09:31PM UTC coverage: 56.401% (+2.0%) from 54.432%
24639605245

Pull #1394

github

joschi
chore: go fmt
Pull Request #1394: feat: OpenTelemetry instrumentation

1016 of 1218 new or added lines in 47 files covered. (83.42%)

8 existing lines in 7 files now uncovered.

4727 of 8381 relevant lines covered (56.4%)

50.89 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