dockercli

package
v0.0.7-0...-445e50d Latest Latest
Warning

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

Go to latest
Published: Jun 1, 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 CreateVolume

func CreateVolume(t *testing.T, cli *client.DockerCli, name string, path string)

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

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

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

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

RunTestEtcd starts an etcd docker container for testing.

func WaitForLine

func WaitForLine(t *testing.T, stdout *io.PipeReader, stoptag string, trace bool) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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