tests_setup

package
v0.0.0-...-d5841c9 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package testing_setup provides ways of creating containers for integration tests

Index

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.

Jump to

Keyboard shortcuts

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