docker: github.com/docker/docker/integration-cli/cli Index | Files | Directories

package cli

import "github.com/docker/docker/integration-cli/cli"

Index

Package Files

cli.go

func Args Uses

func Args(args ...string) icmd.Cmd

Args build an icmd.Cmd struct from the specified arguments

func Build Uses

func Build(name string) icmd.Cmd

Build executes the specified docker build command

func BuildCmd Uses

func BuildCmd(t testing.TB, name string, cmdOperators ...CmdOperator) *icmd.Result

BuildCmd executes the specified docker build command and expect a success

func Daemon Uses

func Daemon(d *daemon.Daemon) func(*icmd.Cmd) func()

Daemon points to the specified daemon

func Docker Uses

func Docker(cmd icmd.Cmd, cmdOperators ...CmdOperator) *icmd.Result

Docker executes the specified docker command

func DockerCmd Uses

func DockerCmd(t testing.TB, args ...string) *icmd.Result

DockerCmd executes the specified docker command and expect a success

func Format Uses

func Format(format string) func(*icmd.Cmd) func()

Format sets the specified format with --format flag

func InDir Uses

func InDir(path string) func(*icmd.Cmd) func()

InDir sets the folder in which the command should be executed

func Inspect Uses

func Inspect(name string) icmd.Cmd

Inspect executes the specified docker inspect command

func InspectCmd Uses

func InspectCmd(t testing.TB, name string, cmdOperators ...CmdOperator) *icmd.Result

InspectCmd executes the specified docker inspect command and expect a success

func SetTestEnvironment Uses

func SetTestEnvironment(env *environment.Execution)

SetTestEnvironment sets a static test environment TODO: decouple this package from environment

func WaitExited Uses

func WaitExited(t testing.TB, 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 Uses

func WaitForInspectResult(t testing.TB, 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 Uses

func WaitRestart(t testing.TB, name string, timeout time.Duration, cmdOperators ...CmdOperator)

WaitRestart will wait for the specified container to restart once

func WaitRun Uses

func WaitRun(t testing.TB, name string, cmdOperators ...CmdOperator)

WaitRun will wait for the specified container to be running, maximum 5 seconds.

func WithEnvironmentVariables Uses

func WithEnvironmentVariables(envs ...string) func(cmd *icmd.Cmd) func()

WithEnvironmentVariables sets the specified environment variables for the command to run

func WithFlags Uses

func WithFlags(flags ...string) func(*icmd.Cmd) func()

WithFlags sets the specified flags for the command to run

func WithStdin Uses

func WithStdin(stdin io.Reader) func(*icmd.Cmd) func()

WithStdin sets the standard input reader for the command

func WithStdout Uses

func WithStdout(writer io.Writer) func(*icmd.Cmd) func()

WithStdout sets the standard output writer of the command

func WithTimeout Uses

func WithTimeout(timeout time.Duration) func(cmd *icmd.Cmd) func()

WithTimeout sets the timeout for the command to run

type CmdOperator Uses

type CmdOperator func(*icmd.Cmd) func()

CmdOperator defines functions that can modify a command

Directories

PathSynopsis
build

Package cli imports 9 packages (graph) and is imported by 21 packages. Updated 2020-02-17. Refresh now. Tools for package owners.