Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Ctx context.Context
)
We need these public variables to share information betwee TestMain and OtherTests, if you have a better idea, tell me
Functions ¶
func StartWithOptions ¶ added in v0.2.0
Start the integration test environment
Types ¶
type Container ¶
type Container interface {
// Executed after the container is started, use it to run migrations
// copy files, etc
AfterStart(context.Context, *dockertest.Resource) error
}
Container represents a docker container
type ContainerParams ¶ added in v0.2.0
func (ContainerParams) GetRepoTag ¶ added in v0.2.0
func (p ContainerParams) GetRepoTag(defaultRepo, defaultTag string) (repo, tag string)
func (ContainerParams) MergeEnv ¶ added in v0.2.0
func (p ContainerParams) MergeEnv(env []string) []string
type Options ¶ added in v0.2.0
type Options struct {
// AutoRemoveContainers set the containers to remove itself when finished, e.g. docker run --rm
AutoRemoveContainers bool
// RestartContainers define if a container must restart after it is finished
RestartContainers bool
// ExpireContainersAfterSeconds sets a container to be destroid after an amount of seconds
ExpireContainersAfterSeconds uint
}
func DefaultOptions ¶ added in v0.4.0
func DefaultOptions() Options
Click to show internal directories.
Click to hide internal directories.