testutils

package
v4.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultImage is the default MinIO container image.
	DefaultImage = "quay.io/minio/minio:latest"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, bucketName string, options ...Option) (s3.Client, testcontainers.Container, error)

NewClient starts a container with a running MinIO instance and returns a new s3.Client, the container and an error.

Notes: Only meant to be used for testing purposes. Host MUST have a docker engine running.

func NewContainer added in v4.2.0

func NewContainer(ctx context.Context, image string, customizers ...testcontainers.ContainerCustomizer) (*miniocontainer.MinioContainer, error)

NewContainer runs a container with a running MinIO instance.

Notes: Only meant to be used for testing purposes. Host MUST have a docker engine running.

Types

type Option added in v4.2.0

type Option func(*containerOptions)

func WithAuthentication added in v4.2.0

func WithAuthentication(username, password string) Option

WithAuthentication configures the container to use authentication with the given username and password.

func WithImage added in v4.2.0

func WithImage(image string) Option

WithImage sets the container image to use.

func WithS3Options added in v4.2.0

func WithS3Options(opts ...s3.ClientOption) Option

WithS3Options adds s3.ClientOption to be used when creating the s3.Client.

Jump to

Keyboard shortcuts

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