Documentation
¶
Overview ¶
Package testutil provides test helper utilities for unit and integration tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMiniredis ¶
NewMiniredis creates an in-memory Redis server for unit tests. The server is automatically cleaned up when the test completes.
func NewMiniredisClient ¶
NewMiniredisClient creates a Redis client connected to an in-memory miniredis server. Both the server and client are automatically cleaned up when the test completes.
Types ¶
type ClickHouseConnection ¶
type ClickHouseConnection struct {
Host string
Port int
Database string
Username string
Password string //nolint:gosec // G117: test config, not a real secret
}
ClickHouseConnection holds ClickHouse connection details.
func NewClickHouseContainer ¶
func NewClickHouseContainer(t *testing.T) ClickHouseConnection
NewClickHouseContainer creates a real ClickHouse container for integration tests. The container is automatically cleaned up when the test completes.
func (ClickHouseConnection) Addr ¶
func (c ClickHouseConnection) Addr() string
Addr returns the ClickHouse address in host:port format.
Click to show internal directories.
Click to hide internal directories.