package testing
import "github.com/golang-migrate/migrate/v4/source/testing"
Package testing has the source tests. All source 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 source.Driver)
- func TestFirst(t *testing.T, d source.Driver)
- func TestNext(t *testing.T, d source.Driver)
- func TestPrev(t *testing.T, d source.Driver)
- func TestReadDown(t *testing.T, d source.Driver)
- func TestReadUp(t *testing.T, d source.Driver)
Functions ¶
func Test ¶
Test runs tests against source implementations. It assumes that the driver tests has access to the following migrations:
u = up migration, d = down migration, n = version
| 1 | - | 3 | 4 | 5 | - | 7 | | u d | - | u | u d | d | - | u d |
See source/stub/stub_test.go or source/file/file_test.go for an example.
func TestFirst ¶
func TestNext ¶
func TestPrev ¶
func TestReadDown ¶
func TestReadUp ¶
Source Files ¶
- Version
- v4.17.1
- Published
- Apr 17, 2024
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 24 seconds ago –
Tools for package owners.