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

golang-migrate / migrate / 17183634279

24 Aug 2025 03:27AM UTC coverage: 54.037% (-2.3%) from 56.309%
17183634279

push

github

web-flow
Merge pull request #1310 from dhui/update_go

Add support for Go 1.25 and drop support for 1.23

4377 of 8100 relevant lines covered (54.04%)

48.21 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
        "testing"
8
)
9

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

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

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

29
func TestMigrateUp(t *testing.T, m *migrate.Migrate) {
×
30
        t.Log("UP")
×
31
        if err := m.Up(); err != nil {
×
32
                t.Fatal(err)
×
33
        }
×
34
}
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

© 2025 Coveralls, Inc