testing

package
v4.0.0-...-227319a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Test

func Test(t *testing.T, d database.Driver, migration []byte)

Test runs tests against database implementations.

func TestDrop

func TestDrop(t *testing.T, d database.Driver)

func TestLockAndUnlock

func TestLockAndUnlock(t *testing.T, d database.Driver)

func TestMigrate

func TestMigrate(t *testing.T, m *migrate.Migrate)

TestMigrate runs integration-tests between the Migrate layer and database implementations.

func TestMigrateDrop

func TestMigrateDrop(t *testing.T, m *migrate.Migrate)

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 TestMigrateUp(t *testing.T, m *migrate.Migrate)

func TestNilVersion

func TestNilVersion(t *testing.T, d database.Driver)

func TestRun

func TestRun(t *testing.T, d database.Driver, migration io.Reader)

func TestSetVersion

func TestSetVersion(t *testing.T, d database.Driver)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL