integration

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualErrorOrNil

func EqualErrorOrNil(t *testing.T, expectedError error, actualError error)

EqualErrorOrNil asserts whether or not an error is equal to an expected error while being nil safe

Types

type DockerService

type DockerService struct {
	// DockerHostname determines how to access services from code. Empty means the code runs within docker.
	// when using docker-for-mac, "localhost" would be used when running outside of docker.
	DockerHostname string
	Image          string
	Version        string
	PublishedPort  string
	ContainerPort  string
	Env            []string
	Cmd            []string
	Entrypoint     []string
	HealthCheck    func(*DockerServiceInstance) error
	Instance       *DockerServiceInstance
}

DockerService contains the various settings required to create a new docker service.

func NewMongoService

func NewMongoService(withinDocker bool) *DockerService

NewMongoService returns a mongo service.

func (*DockerService) Start

func (svc *DockerService) Start() (*DockerServiceInstance, error)

Start starts the instance of the service

func (*DockerService) Stop

func (svc *DockerService) Stop()

Stop stops the currently running instance of the service

type DockerServiceInstance

type DockerServiceInstance struct {

	// ContainerName is the name of the docker container running the service.
	ContainerName string
	// DockerHost is the (hostname + port) to use within docker to access the service.
	// it does not have a scheme
	DockerHost string
	// Host is the host (hostname + port) to use outside of docker to access the service,
	// it does not have a scheme
	Host string
	// contains filtered or unexported fields
}

DockerServiceInstance represents a running service running in docker.

Jump to

Keyboard shortcuts

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