package testing
import "github.com/golang-migrate/migrate/v4/database/testing"
Package testing has the database tests. All database drivers must pass the Test function. This lives in it's own package so it stays a test dependency.
Package testing has the database tests. All database drivers must pass the Test function. This lives in it's own package so it stays a test dependency.
Index ¶
- func Test(t *testing.T, d database.Driver, migration []byte)
- func TestDrop(t *testing.T, d database.Driver)
- func TestLockAndUnlock(t *testing.T, d database.Driver)
- func TestMigrate(t *testing.T, m *migrate.Migrate)
- func TestMigrateDrop(t *testing.T, m *migrate.Migrate)
- func TestMigrateUp(t *testing.T, m *migrate.Migrate)
- func TestNilVersion(t *testing.T, d database.Driver)
- func TestRun(t *testing.T, d database.Driver, migration io.Reader)
- func TestSetVersion(t *testing.T, d database.Driver)
Functions ¶
func Test ¶
Test runs tests against database implementations.
func TestDrop ¶
func TestLockAndUnlock ¶
func TestMigrate ¶
TestMigrate runs integration-tests between the Migrate layer and database implementations.
func TestMigrateDrop ¶
Regression test for preventing a regression for #164 https://github.com/golang-migrate/migrate/pull/173 Similar to TestDrop(), but tests the dropping mechanism through the Migrate logic instead, to check for double-locking during the Drop logic.
func TestMigrateUp ¶
func TestNilVersion ¶
func TestRun ¶
func TestSetVersion ¶
Source Files ¶
- Version
- v4.18.2 (latest)
- Published
- Jan 27, 2025
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 1 week ago –
Tools for package owners.