Documentation
¶
Index ¶
- func SetupElasticsearchContainer(ctx context.Context, url *string) (cleanup, error)
- func SetupKafkaContainer(ctx context.Context, brokers *[]string) (cleanup, error)
- func SetupKafkaSASLContainer(ctx context.Context, brokers *[]string, user SASLUser) (cleanup, error)
- func SetupOpenSearchContainer(ctx context.Context, url *string) (cleanup, error)
- func SetupPostgresContainer(ctx context.Context, url *string, image PostgresImage, configFile ...string) (cleanup, error)
- func SetupPostgresPrimaryReplica(ctx context.Context, primaryURL, replicaURL *string) (cleanup, error)
- type PostgresImage
- type SASLUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupKafkaContainer ¶
func SetupKafkaSASLContainer ¶ added in v1.5.0
func SetupKafkaSASLContainer(ctx context.Context, brokers *[]string, user SASLUser) (cleanup, error)
SetupKafkaSASLContainer starts a Kafka broker that requires SASL authentication on the listener the tests connect to, and accepts the given user over PLAIN, SCRAM-SHA-256 and SCRAM-SHA-512. One broker therefore covers every mechanism, and a test selects one by configuring the client.
The module names the external listener PLAINTEXT and writes that name into the advertised listeners, so the name stays while the security protocol behind it becomes SASL_PLAINTEXT. The inter broker and controller listeners stay unauthenticated: the broker only has to authenticate the clients under test.
func SetupPostgresContainer ¶
func SetupPostgresPrimaryReplica ¶ added in v1.3.0
func SetupPostgresPrimaryReplica(ctx context.Context, primaryURL, replicaURL *string) (cleanup, error)
SetupPostgresPrimaryReplica starts a Postgres primary together with a physical streaming replica of it, on a shared docker network, and writes their connection strings to primaryURL and replicaURL.
Both run Postgres 17 with wal2json, built from testdata/pg-wal2json. That combination is required and not otherwise available in this repo: logical decoding on a standby needs Postgres 16+, while the debezium/postgres images used by the rest of the suite only ship wal2json up to their 14 tag.
The returned cleanup tears down both containers and the network.
Types ¶
type PostgresImage ¶
type PostgresImage string
const ( Postgres14 PostgresImage = "debezium/postgres:14-alpine" Postgres17 PostgresImage = "debezium/postgres:17-alpine" PgvectorPostgres17 PostgresImage = "pgvector/pgvector:pg17" )