check

package
v0.0.0-...-c04e39c Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package check aims to provide simple "helper" methods to ease the use of compose (through libcompose) in (integration) tests using the go-check package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

type Project struct {
	// contains filtered or unexported fields
}

Project holds compose related project attributes

func CreateProject

func CreateProject(c *check.C, name string, composeFiles ...string) *Project

CreateProject creates a compose project with the given name based on the specified compose files

func (*Project) Container

func (p *Project) Container(c *check.C, service string) types.ContainerJSON

Container return the one and only container for a given services. It fails if there is more than one container for the service.

func (*Project) Containers

func (p *Project) Containers(c *check.C, service string) []types.ContainerJSON

Containers lists containers for a given services.

func (*Project) NoContainer

func (p *Project) NoContainer(c *check.C, service string)

NoContainer check is there is no container for the service given It fails if there one or more containers or if the error returned does not indicate an empty container list

func (*Project) Scale

func (p *Project) Scale(c *check.C, service string, count int)

Scale scale a service up

func (*Project) Start

func (p *Project) Start(c *check.C, services ...string)

Start creates and starts services of the compose project,if no services are given, all the services are created/started.

func (*Project) StartOnly

func (p *Project) StartOnly(c *check.C, services ...string)

StartOnly starts services of the compose project,if no services are given, all the services are started.

func (*Project) Stop

func (p *Project) Stop(c *check.C, services ...string)

Stop shuts down and clean services of the compose project,if no services are given, all the services are stopped/deleted.

func (*Project) StopOnly

func (p *Project) StopOnly(c *check.C, services ...string)

StopOnly stops services of the compose project,if no services are given, all the services are stopped.

Jump to

Keyboard shortcuts

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