testcontainer

package
v0.0.0-...-6637ac4 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDockerTLSConfig

func BuildDockerTLSConfig(dockerCertPath string) *tls.Config

BuildDockerTLSConfig builds the docker TLS configuration needed by the API

func CreateAndStartContainer

func CreateAndStartContainer(docker *dockerclient.DockerClient, ctx *ContainerContext) string

CreateAndStartContainer creates abd starts the container given the context specifying the desired container properties

func GetAcceptanceTestContainerInfo

func GetAcceptanceTestContainerInfo(docker *dockerclient.DockerClient, containerType string) *dockerclient.ContainerInfo

GetAcceptanceTestContainerInfo returns information about the specified container type

func ReadDockerEnv

func ReadDockerEnv() (string, string)

ReadDockerEnv reads docker environment variables needed by the docker APIs

Types

type ContainerContext

type ContainerContext struct {
	ImageName string
	Labels    map[string]string
	//PortContext has a container port/proto key and a host port value,
	//with a convention that the container port/proto is an exposed port
	//from the container, and a host port it is mapped to is specified
	//in the map. We further restrict things by assuming a single host
	//mapping for an exposed port.
	PortContext map[string]string
	Links       []string
}

ContainerContext defines context relevant to creating containers via this package

Jump to

Keyboard shortcuts

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