Documentation ¶
Overview ¶
Package testing_setup provides ways of creating containers for integration tests
Index ¶
- type TestContainers
- func (t TestContainers) NewContainer(runOptions *dockertest.RunOptions, ...) (*dockertest.Resource, error)
- func (t TestContainers) NewMailTestServer(ctx context.Context) (*mail.SMTPClient, *dockertest.Resource, error)
- func (t TestContainers) NewMongoContainer(ctx context.Context) (*mongo.Client, *dockertest.Resource, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestContainers ¶
type TestContainers struct {
Pool *dockertest.Pool
}
func (TestContainers) NewContainer ¶
func (t TestContainers) NewContainer(runOptions *dockertest.RunOptions, retryFunction func(resource *dockertest.Resource) func() error) (*dockertest.Resource, error)
NewContainer creates a new container for running integration tests against. This container can be any docker container that can be pulled and run so tests can run tests against it.
func (TestContainers) NewMailTestServer ¶
func (t TestContainers) NewMailTestServer(ctx context.Context) (*mail.SMTPClient, *dockertest.Resource, error)
func (TestContainers) NewMongoContainer ¶
func (t TestContainers) NewMongoContainer(ctx context.Context) (*mongo.Client, *dockertest.Resource, error)
NewMongoContainer create a new mongodb container for running integration tests against.
Click to show internal directories.
Click to hide internal directories.