containers

package
v2.45.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0, BSD-3-Clause, MIT Imports: 7 Imported by: 0

Documentation

Overview

Package containers contains utilities for running test containers in integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContainer

func NewContainer(
	ctx context.Context,
	t *testing.T,
	image string,
	maxRetries int,
	opts ...ContainerOptionFn,
) testcontainers.Container

func Port

func Port(
	ctx context.Context,
	t *testing.T,
	container testcontainers.Container,
	port nat.Port,
) string

Types

type ContainerOptionFn

type ContainerOptionFn func(*testcontainers.ContainerRequest)

func WithEnv

func WithEnv(env map[string]string) ContainerOptionFn

func WithHostname

func WithHostname(hostname string) ContainerOptionFn

func WithPorts

func WithPorts(ports []string) ContainerOptionFn

func WithWaitStrategy

func WithWaitStrategy(waitStrategy wait.Strategy) ContainerOptionFn

Jump to

Keyboard shortcuts

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