Documentation ¶
Overview ¶
Package testing aims to provide simple "helper" methods to ease the use of compose (through libcompose) in (integration) tests using built-in testing.
Index ¶
- type Project
- func (p *Project) Container(t *testing.T, service string) types.ContainerJSON
- func (p *Project) Containers(t *testing.T, service string) []types.ContainerJSON
- func (p *Project) NoContainer(t *testing.T, service string)
- func (p *Project) Scale(t *testing.T, service string, count int)
- func (p *Project) Start(t *testing.T, services ...string)
- func (p *Project) Stop(t *testing.T, services ...string)
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 ¶
CreateProject creates a compose project with the given name based on the specified compose files
func (*Project) Container ¶
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 ¶
Containers lists containers for a given services.
func (*Project) NoContainer ¶
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