containertest

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTestDockerContainer

func RunTestDockerContainer(t *testing.T, runOpts *dockertest.RunOptions) (*dockertest.Pool, *dockertest.Resource, func())

RunTestDockerContainer (presently) runs a Docker container to be used in tests. It returns the dockertest.Pool & dockertest.Container resources, and a deferrable function used to stop the started container. The container address can be retrieved from the container.GetHostPort() method, and if desired, a readiness probe func can be passed using the pool.Retry() method.

For examples of how to use this function, refer to its *own* tests, as they serve as the most basic & straightforward usage.

In the future, this package is expected to support more than just Docker as a container runtime.

Types

This section is empty.

Jump to

Keyboard shortcuts

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