testenv

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package testenv provides shared container-backed integration helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCPPubSubContainer

type GCPPubSubContainer struct {
	Container *tcpubsub.Container
	ProjectID string
	URI       string
}

GCPPubSubContainer holds the started Pub/Sub emulator and connection details.

func StartGCPPubSub

func StartGCPPubSub(ctx context.Context) (*GCPPubSubContainer, error)

StartGCPPubSub starts a disposable Google Pub/Sub emulator container for integration tests.

type KafkaContainer

type KafkaContainer struct {
	Container *tckafka.KafkaContainer
	Brokers   []string
}

KafkaContainer holds the started Kafka container and connection details.

func StartKafka

func StartKafka(ctx context.Context) (*KafkaContainer, error)

StartKafka starts a disposable Kafka container for integration tests.

type NATSContainer

type NATSContainer struct {
	Container testcontainers.Container
	URL       string
}

NATSContainer holds the started NATS container and connection details.

func StartNATS

func StartNATS(ctx context.Context) (*NATSContainer, error)

StartNATS starts a disposable NATS container for integration tests.

type NATSJetStreamContainer

type NATSJetStreamContainer struct {
	Container testcontainers.Container
	URL       string
}

NATSJetStreamContainer holds the started NATS JetStream container and connection details.

func StartNATSJetStream

func StartNATSJetStream(ctx context.Context) (*NATSJetStreamContainer, error)

StartNATSJetStream starts a disposable NATS container with JetStream enabled.

type RedisContainer

type RedisContainer struct {
	Container testcontainers.Container
	Addr      string
}

RedisContainer holds the started Redis container and connection details.

func StartRedis

func StartRedis(ctx context.Context) (*RedisContainer, error)

StartRedis starts a disposable Redis container for integration tests.

type SNSContainer

type SNSContainer struct {
	Container testcontainers.Container
	Endpoint  string
	Region    string
}

SNSContainer holds the started LocalStack container and connection details.

func StartSNS

func StartSNS(ctx context.Context) (*SNSContainer, error)

StartSNS starts a disposable LocalStack SNS/SQS container for integration tests.

Jump to

Keyboard shortcuts

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