package testing
import "github.com/golang-migrate/migrate/v4/testing"
Package testing is used in driver tests.
Index ¶
- func ParallelTest(t *testing.T, versions []Version, readyFn IsReadyFunc, testFn TestFunc)
- type DockerContainer
- func NewDockerContainer(t testing.TB, image string, env []string, cmd []string) (*DockerContainer, error)
- func (d *DockerContainer) Host() string
- func (d *DockerContainer) Inspect() error
- func (d *DockerContainer) KeepForDebugging()
- func (d *DockerContainer) Logs() (io.ReadCloser, error)
- func (d *DockerContainer) NetworkSettings() dockertypes.NetworkSettings
- func (d *DockerContainer) Port() uint
- func (d *DockerContainer) PortFor(cPort int) uint
- func (d *DockerContainer) PullImage() error
- func (d *DockerContainer) Remove() error
- func (d *DockerContainer) Start() error
- type Instance
- type IsReadyFunc
- type TestFunc
- type Version
Functions ¶
func ParallelTest ¶
func ParallelTest(t *testing.T, versions []Version, readyFn IsReadyFunc, testFn TestFunc)
Types ¶
type DockerContainer ¶
type DockerContainer struct { ImageName string ENV []string Cmd []string ContainerId string ContainerName string ContainerJSON dockertypes.ContainerJSON // contains filtered or unexported fields }
DockerContainer implements Instance interface
func NewDockerContainer ¶
func NewDockerContainer(t testing.TB, image string, env []string, cmd []string) (*DockerContainer, error)
func (*DockerContainer) Host ¶
func (d *DockerContainer) Host() string
func (*DockerContainer) Inspect ¶
func (d *DockerContainer) Inspect() error
func (*DockerContainer) KeepForDebugging ¶
func (d *DockerContainer) KeepForDebugging()
func (*DockerContainer) Logs ¶
func (d *DockerContainer) Logs() (io.ReadCloser, error)
func (*DockerContainer) NetworkSettings ¶
func (d *DockerContainer) NetworkSettings() dockertypes.NetworkSettings
func (*DockerContainer) Port ¶
func (d *DockerContainer) Port() uint
func (*DockerContainer) PortFor ¶
func (d *DockerContainer) PortFor(cPort int) uint
func (*DockerContainer) PullImage ¶
func (d *DockerContainer) PullImage() error
func (*DockerContainer) Remove ¶
func (d *DockerContainer) Remove() error
func (*DockerContainer) Start ¶
func (d *DockerContainer) Start() error
type Instance ¶
type Instance interface { Host() string Port() uint PortFor(int) uint NetworkSettings() dockertypes.NetworkSettings KeepForDebugging() }
type IsReadyFunc ¶
type TestFunc ¶
type Version ¶
Source Files ¶
- Version
- v4.0.1
- Published
- Oct 15, 2018
- Platform
- js/wasm
- Imports
- 17 packages
- Last checked
- 3 seconds ago –
Tools for package owners.