Documentation
¶
Index ¶
- Constants
- func Bootstrap[S BackingService](id string, srv S) (S, error)
- func BootstrapService[S BackingService](id string, srv S, localTo T) (S, error)
- func Must(t T, err error, actionFormat string, a ...any)
- func PurgeBackingServices() error
- type BackingService
- type Minio
- func (m *Minio) Client() (*minio.Client, error)
- func (m *Minio) CreateBucket(ctx context.Context, t T, prefix string) string
- func (m *Minio) Environment() MinioEnvironment
- func (m *Minio) Purge(pool *dockertest.Pool) error
- func (m *Minio) SetUp(pool *dockertest.Pool, network *dockertest.Network) error
- type MinioEnvironment
- type OpenSearch
- type PGEnvironment
- type Postgres
- type T
- type Valkey
- type ValkeyEnvironment
Constants ¶
View Source
const ( Minio202302 = "RELEASE.2023-02-22T18-23-45Z" Minio202509 = "RELEASE.2025-09-07T16-13-09Z" )
View Source
const ( Postgres15_2 = "15.2" Postgres17_6 = "17.6-alpine3.22" )
View Source
const ( // ValkeyRepo is the upstream Valkey image. Valkey is a community // fork of Redis kept under the BSD 3-clause license and exposes // the same RESP protocol, so applications targeting Redis work // unchanged. ValkeyRepo = "valkey/valkey" Valkey8_0 = "8.0" Valkey8_1 = "8.1" )
View Source
const OpenSearch2_19 = "v2.19.3-2"
Variables ¶
This section is empty.
Functions ¶
func Bootstrap ¶
func Bootstrap[S BackingService](id string, srv S) (S, error)
func BootstrapService ¶ added in v0.2.0
func BootstrapService[S BackingService](id string, srv S, localTo T) (S, error)
func PurgeBackingServices ¶
func PurgeBackingServices() error
Types ¶
type BackingService ¶
type BackingService interface {
SetUp(pool *dockertest.Pool, network *dockertest.Network) error
Purge(pool *dockertest.Pool) error
}
type Minio ¶
type Minio struct {
// contains filtered or unexported fields
}
func (*Minio) CreateBucket ¶
CreateBucket with the given prefix and a suffix based on the test name.
func (*Minio) Environment ¶
func (m *Minio) Environment() MinioEnvironment
func (*Minio) SetUp ¶
func (m *Minio) SetUp(pool *dockertest.Pool, network *dockertest.Network) error
type MinioEnvironment ¶
type OpenSearch ¶ added in v0.2.0
type OpenSearch struct {
// contains filtered or unexported fields
}
func NewOpenSearch ¶ added in v0.2.0
func NewOpenSearch(t T, tag string) *OpenSearch
func (*OpenSearch) GetContainerEndpoint ¶ added in v0.2.2
func (m *OpenSearch) GetContainerEndpoint() string
func (*OpenSearch) GetEndpoint ¶ added in v0.2.0
func (m *OpenSearch) GetEndpoint() string
func (*OpenSearch) Purge ¶ added in v0.2.0
func (m *OpenSearch) Purge(pool *dockertest.Pool) error
func (*OpenSearch) SetUp ¶ added in v0.2.0
func (m *OpenSearch) SetUp(pool *dockertest.Pool, network *dockertest.Network) error
type PGEnvironment ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
func (*Postgres) SetUp ¶
func (pg *Postgres) SetUp(pool *dockertest.Pool, network *dockertest.Network) error
type Valkey ¶ added in v0.3.0
type Valkey struct {
// contains filtered or unexported fields
}
func NewValkey ¶ added in v0.3.0
NewValkey bootstraps a Valkey container shared across tests in the process (or unique to the test if BootstrapService is used directly).
func (*Valkey) Client ¶ added in v0.3.0
Client returns a fresh go-redis client connected to the Valkey instance from the host. Tests that need redis interactions should call this for each test (or each goroutine) — clients are cheap and returning a shared one would let tests step on each other.
func (*Valkey) Environment ¶ added in v0.3.0
func (v *Valkey) Environment() ValkeyEnvironment
func (*Valkey) SetUp ¶ added in v0.3.0
func (v *Valkey) SetUp(pool *dockertest.Pool, network *dockertest.Network) error
type ValkeyEnvironment ¶ added in v0.3.0
ValkeyEnvironment carries the addresses tests should use to reach the Valkey instance, both from the host (Addr) and from another container on the eltest network (ContainerAddr).
Click to show internal directories.
Click to hide internal directories.