Documentation ¶
Index ¶
- func Create(t *testing.T, ctx context.Context, client client.APIClient, ...) string
- func Run(t *testing.T, ctx context.Context, client client.APIClient, ...) string
- func WithCmd(cmds ...string) func(*TestContainerConfig)
- func WithExposedPorts(ports ...string) func(*TestContainerConfig)
- func WithLinks(links ...string) func(*TestContainerConfig)
- func WithName(name string) func(*TestContainerConfig)
- func WithNetworkMode(mode string) func(*TestContainerConfig)
- func WithTty(tty bool) func(*TestContainerConfig)
- func WithWorkingDir(dir string) func(*TestContainerConfig)
- type TestContainerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(t *testing.T, ctx context.Context, client client.APIClient, ops ...func(*TestContainerConfig)) string
Create creates a container with the specified options
func Run ¶
func Run(t *testing.T, ctx context.Context, client client.APIClient, ops ...func(*TestContainerConfig)) string
Run creates and start a container with the specified options
func WithCmd ¶
func WithCmd(cmds ...string) func(*TestContainerConfig)
WithCmd sets the comannds of the container
func WithExposedPorts ¶
func WithExposedPorts(ports ...string) func(*TestContainerConfig)
WithExposedPorts sets the exposed ports of the container
func WithLinks ¶
func WithLinks(links ...string) func(*TestContainerConfig)
WithLinks sets the links of the container
func WithName ¶
func WithName(name string) func(*TestContainerConfig)
WithName sets the name of the container
func WithNetworkMode ¶
func WithNetworkMode(mode string) func(*TestContainerConfig)
WithNetworkMode sets the network mode of the container
func WithTty ¶
func WithTty(tty bool) func(*TestContainerConfig)
WithTty sets the TTY mode of the container
func WithWorkingDir ¶
func WithWorkingDir(dir string) func(*TestContainerConfig)
WithWorkingDir sets the working dir of the container
Types ¶
type TestContainerConfig ¶
type TestContainerConfig struct { Name string Config *container.Config HostConfig *container.HostConfig NetworkingConfig *network.NetworkingConfig }
TestContainerConfig holds container configuration struct that are used in api calls.
Click to show internal directories.
Click to hide internal directories.