Documentation ¶
Overview ¶
Package dockercli provides helper functions for testing with Docker.
Index ¶
- func CloseWrap(args ...io.Closer) error
- func CreateVolume(t *testing.T, cli *client.DockerCli, name string, path string)
- func DeisServiceTest(t *testing.T, container string, port string, protocol string)
- func DockerHost() (string, string, error)
- func GetImageID(t *testing.T, repo string) string
- func GetInspectData(t *testing.T, format string, container string) string
- func NewClient() (cli *client.DockerCli, stdout *io.PipeReader, stdoutPipe *io.PipeWriter)
- func PrintToStdout(t *testing.T, stdout *io.PipeReader, stdoutPipe *io.PipeWriter, stoptag string) string
- func RunContainer(cli *client.DockerCli, args ...string) error
- func RunDeisDataTest(t *testing.T, args ...string)
- func RunTestEtcd(t *testing.T, name string, port string)
- func RunTestRegistry(t *testing.T, name, host, port string)
- func WaitForLine(t *testing.T, stdout *io.PipeReader, stoptag string, trace bool) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateVolume ¶ added in v1.5.0
func DeisServiceTest ¶
DeisServiceTest tries to connect to a container and port using the specified protocol.
func DockerHost ¶ added in v0.12.0
DockerHost returns the protocol and address of the docker server.
func GetImageID ¶
GetImageID returns the ID of a docker image.
func GetInspectData ¶
GetInspectData prints and returns `docker inspect` data for a container.
func NewClient ¶ added in v0.12.0
func NewClient() ( cli *client.DockerCli, stdout *io.PipeReader, stdoutPipe *io.PipeWriter)
NewClient returns a new docker test client.
func PrintToStdout ¶
func PrintToStdout(t *testing.T, stdout *io.PipeReader, stdoutPipe *io.PipeWriter, stoptag string) string
PrintToStdout prints a string to stdout.
func RunContainer ¶
RunContainer runs a docker image with the given arguments.
func RunDeisDataTest ¶
RunDeisDataTest starts a data container as a prerequisite for a service.
func RunTestEtcd ¶ added in v0.12.0
RunTestEtcd starts an etcd docker container for testing.
func RunTestRegistry ¶ added in v1.10.0
RunTestRegistry runs a Docker registry for testing.
This uses a stock Docker registry with no storage backend.
func WaitForLine ¶ added in v1.5.0
Types ¶
This section is empty.