testing

package
v1.0.0-alpha08 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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, port int) (*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()
	Remove() error
}

type IsReadyFunc

type IsReadyFunc func(Instance) bool

type TestFunc

type TestFunc func(*testing.T, Instance)

type Version

type Version struct {
	Image       string
	ENV         []string
	Cmd         []string
	ExposedPort int
}

Jump to

Keyboard shortcuts

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