testenvironment

package
v0.0.0-...-3295dff Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MongoContainer         = "mongo"
	MysqlContainer         = "mysql"
	NatsContainer          = "nats"
	NatsStreamingContainer = "nats-streaming"
	PostgresContainer      = "postgres"
	SftpContainer          = "sftp"
	FtpContainer           = "ftp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TestEnvironment

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

Uses prefab (github.com/byrnedo/prefab) to create docker containers for test environments

func NewTestEnvironment

func NewTestEnvironment() *TestEnvironment

func (*TestEnvironment) Cleanup

func (this *TestEnvironment) Cleanup()

func (*TestEnvironment) GetUrl

func (this *TestEnvironment) GetUrl(name string) (string, bool)

func (*TestEnvironment) Launch

func (this *TestEnvironment) Launch()

Launch the queued containers

func (*TestEnvironment) WithFtp

func (this *TestEnvironment) WithFtp() *TestEnvironment

A ftp container (note - can only run one at a time)

func (*TestEnvironment) WithMaxTimeout

func (this *TestEnvironment) WithMaxTimeout(timeout time.Duration) *TestEnvironment

Set the max timeout for waiting on individual containers

func (*TestEnvironment) WithMongo

func (this *TestEnvironment) WithMongo() *TestEnvironment

Queue a mongo container

func (*TestEnvironment) WithMongoTmpfs

func (this *TestEnvironment) WithMongoTmpfs() *TestEnvironment

Queue a mongo tmpfs container

func (*TestEnvironment) WithMysql

func (this *TestEnvironment) WithMysql() *TestEnvironment

Queue a mysql container

func (*TestEnvironment) WithMysqlTmpfs

func (this *TestEnvironment) WithMysqlTmpfs() *TestEnvironment

Queue a mysql container on tmpfs

func (*TestEnvironment) WithNats

func (this *TestEnvironment) WithNats() *TestEnvironment

Queue a nats container

func (*TestEnvironment) WithNatsStreaming

func (this *TestEnvironment) WithNatsStreaming() *TestEnvironment

func (*TestEnvironment) WithPostgres

func (this *TestEnvironment) WithPostgres() *TestEnvironment

Queue a postgres container

func (*TestEnvironment) WithSftp

func (this *TestEnvironment) WithSftp() *TestEnvironment

An Sftp container

Jump to

Keyboard shortcuts

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