containers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PRIORITY_DEFAULT = 100
)

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, te TestEnvironment)

func RunFile

func RunFile(t *testing.T, te TestEnvironment, file string)

Types

type AfterSetupContainers

type AfterSetupContainers interface {
	AfterSetupContainers() error
}

type AfterTerminateContainers

type AfterTerminateContainers interface {
	AfterTerminateContainers() error
}

type BeforeSetupContainers

type BeforeSetupContainers interface {
	BeforeSetupContainers() error
}

type BeforeTerminateContainers

type BeforeTerminateContainers interface {
	BeforeTerminateContainers() error
}

type ContainerConfig

type ContainerConfig struct {
	Name            string
	Service         *Service
	Commands        []string
	AlwaysPullImage bool
	Priority        int
	ShowLog         bool

	Volumes   map[string]string
	Ports     map[string]string
	LabelProp map[string]string
	LabelEnv  map[string]string
	// contains filtered or unexported fields
}

type ContainerTestEnvironment

type ContainerTestEnvironment struct {
	suite.Suite
	// contains filtered or unexported fields
}

func (*ContainerTestEnvironment) DockerCompose

func (d *ContainerTestEnvironment) DockerCompose() DockerCompose

func (*ContainerTestEnvironment) Fatal

func (d *ContainerTestEnvironment) Fatal(args ...interface{})

func (*ContainerTestEnvironment) Fatalf

func (d *ContainerTestEnvironment) Fatalf(format string, args ...interface{})

func (*ContainerTestEnvironment) File

func (d *ContainerTestEnvironment) File() string

func (*ContainerTestEnvironment) Log

func (d *ContainerTestEnvironment) Log(format string)

func (*ContainerTestEnvironment) Logf

func (d *ContainerTestEnvironment) Logf(format string, args ...interface{})

func (*ContainerTestEnvironment) Service

func (d *ContainerTestEnvironment) Service(name string) (*DockerService, bool)

func (*ContainerTestEnvironment) ServicePort

func (d *ContainerTestEnvironment) ServicePort(name, port string) int

func (*ContainerTestEnvironment) SetupSuite

func (d *ContainerTestEnvironment) SetupSuite()

func (*ContainerTestEnvironment) TearDownSuite

func (d *ContainerTestEnvironment) TearDownSuite()

type DockerCompose

type DockerCompose struct {
	Version  string              `yaml:"version"`
	Services map[string]*Service `yaml:"services"`
}

type DockerService

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

func (*DockerService) Accept

func (d *DockerService) Accept(l testcontainers.Log)

func (*DockerService) Port

func (d *DockerService) Port(ctx context.Context, port string) (int, error)

type Log

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

type Port

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

type Service

type Service struct {
	ContainerName string            `yaml:"container_name"`
	Image         string            `yaml:"image"`
	Environment   map[string]string `yaml:"environment"`
	Labels        []string          `yaml:"labels"`
	Ports         []string          `yaml:"ports"`
	Networks      []string          `yaml:"networks"`
	Command       []string          `yaml:"command"`
	Volumes       []string          `yaml:"volumes"`
}

type TestEnvironment

type TestEnvironment interface {
	// contains filtered or unexported methods
}

type Wait

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

Jump to

Keyboard shortcuts

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