Documentation ¶
Index ¶
- func Args(args ...string) icmd.Cmd
- func Build(name string) icmd.Cmd
- func BuildCmd(t testingT, name string, cmdOperators ...CmdOperator) *icmd.Result
- func Daemon(d *daemon.Daemon) func(*icmd.Cmd) func()
- func Docker(cmd icmd.Cmd, cmdOperators ...CmdOperator) *icmd.Result
- func DockerCmd(t testingT, args ...string) *icmd.Result
- func Format(format string) func(*icmd.Cmd) func()
- func InDir(path string) func(*icmd.Cmd) func()
- func Inspect(name string) icmd.Cmd
- func InspectCmd(t testingT, name string, cmdOperators ...CmdOperator) *icmd.Result
- func SetTestEnvironment(env *environment.Execution)
- func WaitExited(t testingT, name string, timeout time.Duration, cmdOperators ...CmdOperator)
- func WaitForInspectResult(t testingT, name, expr, expected string, timeout time.Duration, ...)
- func WaitRestart(t testingT, name string, timeout time.Duration, cmdOperators ...CmdOperator)
- func WaitRun(t testingT, name string, cmdOperators ...CmdOperator)
- func WithEnvironmentVariables(envs ...string) func(cmd *icmd.Cmd) func()
- func WithFlags(flags ...string) func(*icmd.Cmd) func()
- func WithStdin(stdin io.Reader) func(*icmd.Cmd) func()
- func WithStdout(writer io.Writer) func(*icmd.Cmd) func()
- func WithTimeout(timeout time.Duration) func(cmd *icmd.Cmd) func()
- type CmdOperator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCmd ¶
func BuildCmd(t testingT, name string, cmdOperators ...CmdOperator) *icmd.Result
BuildCmd executes the specified docker build command and expect a success
func Docker ¶
func Docker(cmd icmd.Cmd, cmdOperators ...CmdOperator) *icmd.Result
Docker executes the specified docker command
func InspectCmd ¶
func InspectCmd(t testingT, name string, cmdOperators ...CmdOperator) *icmd.Result
InspectCmd executes the specified docker inspect command and expect a success
func SetTestEnvironment ¶
func SetTestEnvironment(env *environment.Execution)
SetTestEnvironment sets a static test environment TODO: decouple this package from environment
func WaitExited ¶
func WaitExited(t testingT, name string, timeout time.Duration, cmdOperators ...CmdOperator)
WaitExited will wait for the specified container to state exit, subject to a maximum time limit in seconds supplied by the caller
func WaitForInspectResult ¶
func WaitForInspectResult(t testingT, name, expr, expected string, timeout time.Duration, cmdOperators ...CmdOperator)
WaitForInspectResult waits for the specified expression to be equals to the specified expected string in the given time.
func WaitRestart ¶
func WaitRestart(t testingT, name string, timeout time.Duration, cmdOperators ...CmdOperator)
WaitRestart will wait for the specified container to restart once
func WaitRun ¶
func WaitRun(t testingT, name string, cmdOperators ...CmdOperator)
WaitRun will wait for the specified container to be running, maximum 5 seconds.
func WithEnvironmentVariables ¶
WithEnvironmentVariables sets the specified environment variables for the command to run
func WithStdout ¶
WithStdout sets the standard output writer of the command
Types ¶
type CmdOperator ¶
CmdOperator defines functions that can modify a command