dockercli

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2014 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildImage

func BuildImage(t *testing.T, path string, tag string) error

BuildImage builds and tags a docker image from a Dockerfile.

func ClearTestSession

func ClearTestSession(t *testing.T, uid string)

ClearTestSession cleans up after a typical test session.

func CloseWrap

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

CloseWrap ensures that an io.Writer is closed.

func DaemonAddr

func DaemonAddr() string

DaemonAddr returns the docker server address for testing.

func DaemonProto

func DaemonProto() string

DaemonProto returns the docker server protocol for testing.

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 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 GetNewClient

func GetNewClient() (
	cli *client.DockerCli, stdout *io.PipeReader, stdoutPipe *io.PipeWriter)

GetNewClient 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 PullImage

func PullImage(t *testing.T, cli *client.DockerCli, args ...string)

PullImage pulls a docker image from the docker index.

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 RunEtcdTest

func RunEtcdTest(t *testing.T, uid string, port string)

RunEtcdTest 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