package cli
import "github.com/docker/docker/integration-cli/cli"
Index ¶
- func Args(commandAndArgs ...string) icmd.Cmd
- func BuildCmd(t testing.TB, 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 testing.TB, args ...string) *icmd.Result
- func Format(format string) func(*icmd.Cmd) func()
- func InDir(path string) func(*icmd.Cmd) func()
- func InspectCmd(t testing.TB, name string, cmdOperators ...CmdOperator) *icmd.Result
- func SetTestEnvironment(env *environment.Execution)
- func WaitExited(t testing.TB, name string, timeout time.Duration, cmdOperators ...CmdOperator)
- func WaitRun(t testing.TB, 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
Functions ¶
func Args ¶
Args build an icmd.Cmd struct from the specified (command and) arguments.
func BuildCmd ¶
BuildCmd executes the specified docker build command and expect a success
func Daemon ¶
Daemon points to the specified daemon
func Docker ¶
func Docker(cmd icmd.Cmd, cmdOperators ...CmdOperator) *icmd.Result
Docker executes the specified docker command
func DockerCmd ¶
DockerCmd executes the specified docker command and expect a success
func Format ¶
Format sets the specified format with --format flag
func InDir ¶
InDir sets the folder in which the command should be executed
func InspectCmd ¶
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 ¶
WaitExited will wait for the specified container to state exit, subject to a maximum time limit in seconds supplied by the caller
func WaitRun ¶
func WaitRun(t testing.TB, 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 WithFlags ¶
WithFlags sets the specified flags for the command to run
func WithStdin ¶
WithStdin sets the standard input reader for the command
func WithStdout ¶
WithStdout sets the standard output writer of the command
func WithTimeout ¶
WithTimeout sets the timeout for the command to run
Types ¶
type CmdOperator ¶
CmdOperator defines functions that can modify a command
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
integration-cli/cli/build |
- Version
- v26.0.1+incompatible
- Published
- Apr 10, 2024
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 3 minutes ago –
Tools for package owners.