testinfra

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeclareTestAWSInfrastructure

func DeclareTestAWSInfrastructure(ctx context.Context, cfg *mqs.AWSSQSConfig, attributes map[string]string) (string, error)

func DeclareTestGCPInfrastructure

func DeclareTestGCPInfrastructure(ctx context.Context, cfg *mqs.GCPPubSubConfig, endpoint string) error

func EnsureGCP

func EnsureGCP() string

func EnsureLocalStack

func EnsureLocalStack() string

func EnsureRabbitMQ

func EnsureRabbitMQ() string

func GetAzureSBConnString added in v0.4.0

func GetAzureSBConnString() string

func GetMQAzureConfig added in v0.4.0

func GetMQAzureConfig(t *testing.T, testName string) mqs.QueueConfig

func GetMockServer

func GetMockServer(t *testing.T) string

func NewClickHouseConfig

func NewClickHouseConfig(t *testing.T) clickhouse.ClickHouseConfig

func NewDragonflyConfig added in v0.11.0

func NewDragonflyConfig(t *testing.T) *redis.RedisConfig

NewDragonflyConfig spins up a dedicated Dragonfly container for the test. Each caller gets its own isolated container on DB 0, eliminating cross-test interference. The container is terminated on cleanup.

func NewDragonflyStackConfig added in v0.12.0

func NewDragonflyStackConfig(t *testing.T) *redis.RedisConfig

NewDragonflyStackConfig is an alias for NewDragonflyConfig. Kept for backward compatibility with existing test code.

func NewMQAWSConfig

func NewMQAWSConfig(t *testing.T, attributes map[string]string) mqs.QueueConfig

func NewMQGCPConfig

func NewMQGCPConfig(t *testing.T, attributes map[string]string) mqs.QueueConfig

func NewMQRabbitMQConfig

func NewMQRabbitMQConfig(t *testing.T) mqs.QueueConfig

func NewPostgresConfig

func NewPostgresConfig(t *testing.T) string

func NewRedisConfig added in v0.11.0

func NewRedisConfig(t *testing.T) *redis.RedisConfig

NewRedisConfig spins up a dedicated Redis container for the test. Use this for tests that don't need RediSearch. The container is terminated on cleanup.

func NewRedisStackConfig added in v0.12.0

func NewRedisStackConfig(t *testing.T) *redis.RedisConfig

NewRedisStackConfig spins up a dedicated Redis Stack container for tests requiring RediSearch. Each test gets its own isolated container, eliminating cross-test interference. The container is terminated on cleanup.

func Start

func Start(t *testing.T) func()

func TeardownTestAWSInfrastructure

func TeardownTestAWSInfrastructure(ctx context.Context, cfg *mqs.AWSSQSConfig) error

func TeardownTestGCPInfrastructure

func TeardownTestGCPInfrastructure(ctx context.Context, cfg *mqs.GCPPubSubConfig, endpoint string) error

Types

type Config

type Config struct {
	TestInfra         bool
	TestAzure         bool
	ClickHouseURL     string
	PostgresURL       string
	LocalStackURL     string
	RabbitMQURL       string
	MockServerURL     string
	GCPURL            string
	AzureSBConnString string
	// contains filtered or unexported fields
}

func ReadConfig

func ReadConfig() *Config

type MockServerInfra

type MockServerInfra struct {
	// contains filtered or unexported fields
}

func NewMockServerInfra

func NewMockServerInfra(baseURL string) *MockServerInfra

func (*MockServerInfra) NewMockDestination

func (mock *MockServerInfra) NewMockDestination(t *testing.T, destination models.Destination)

type PGDB

type PGDB struct{}

Jump to

Keyboard shortcuts

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