dockercli

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2015 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package dockercli provides helper functions for testing with Docker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseWrap

func CloseWrap(args ...io.Closer) error

CloseWrap ensures that an io.Writer is closed.

func DeisServiceTest

func DeisServiceTest(
	t *testing.T, container string, port string, protocol string)

DeisServiceTest tries to connect to a container and port using the specified protocol.

func DockerHost added in v0.12.0

func DockerHost() (string, string, error)

DockerHost returns the protocol and address of the docker server.

func GetImageID

func GetImageID(t *testing.T, repo string) string

GetImageID returns the ID of a docker image.

func GetInspectData

func GetInspectData(t *testing.T, format string, container string) string

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

func RunContainer(cli *client.DockerCli, args ...string) error

RunContainer runs a docker image with the given arguments.

func RunDeisDataTest

func RunDeisDataTest(t *testing.T, args ...string)

RunDeisDataTest starts a data container as a prerequisite for a service.

func RunTestEtcd added in v0.12.0

func RunTestEtcd(t *testing.T, name string, port string)

RunTestEtcd starts an etcd docker container for testing.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL