Documentation ¶
Index ¶
- func CreateContainer(ctx context.Context, t *testing.T, image string, opts ...ContainerOptionFn) testcontainers.Container
- func CreateNetwork(ctx context.Context, t *testing.T, name string) testcontainers.Network
- func GetContainerAddress(ctx context.Context, t *testing.T, container testcontainers.Container, ...) string
- func ReadText(t *testing.T, path string) string
- func RemoveNetwork(ctx context.Context, t *testing.T, network testcontainers.Network)
- func TerminateContainer(ctx context.Context, t *testing.T, container testcontainers.Container)
- func WaitUntilHealthy(ctx context.Context, t *testing.T, url string, maxElapsedTime time.Duration)
- func WriteText(t *testing.T, path string, content string)
- type ContainerOptionFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateContainer ¶
func CreateNetwork ¶
func GetContainerAddress ¶
func RemoveNetwork ¶
func TerminateContainer ¶
func WaitUntilHealthy ¶
Types ¶
type ContainerOptionFn ¶
type ContainerOptionFn func(*testcontainers.ContainerRequest)
func WithEnv ¶
func WithEnv(env map[string]string) ContainerOptionFn
func WithNetworks ¶
func WithNetworks(networks []string) ContainerOptionFn
func WithPorts ¶
func WithPorts(ports []string) ContainerOptionFn
func WithWaitStrategy ¶
func WithWaitStrategy(strategy wait.Strategy) ContainerOptionFn
Click to show internal directories.
Click to hide internal directories.