testutil

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package testutil provides test utilities for CBT, including:

  • ClickHouse container helpers for integration tests (clickhouse.go)
  • Redis container helpers for integration tests (redis.go)
  • Miniredis helpers for unit tests (miniredis.go)

Integration test utilities require Docker and are gated behind the "integration" build tag. To run integration tests:

go test -tags=integration ./...

Unit test helpers (miniredis) do not require Docker and work with regular tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiniredis

func NewMiniredis(t *testing.T) *miniredis.Miniredis

NewMiniredis creates an in-memory Redis for unit tests (no Docker needed). The server is automatically closed when the test completes.

func NewMiniredisClient

func NewMiniredisClient(t *testing.T) (*miniredis.Miniredis, *redis.Client)

NewMiniredisClient returns both a miniredis server and a connected client. Both are automatically closed when the test completes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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