testutils

package
v0.0.0-...-d038e5a Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const PostgresContainerImage = "postgres:17-alpine"

Variables

This section is empty.

Functions

func ClickHouseImage

func ClickHouseImage() string

ClickHouseImage is the testcontainers ClickHouse pin. CI exports CLICKHOUSE_IMAGE (see .gitlab-ci.yml), so this default only governs local runs.

func LogClickHouseVersion

func LogClickHouseVersion(ctx context.Context, c testcontainers.Container)

LogClickHouseVersion prints the image and the server's own version, once per test process. The tag alone is ambiguous once latest-alpine is in play.

Types

type CertPair

type CertPair struct {
	// TLS configuration ready to use
	ServerTLSConfig *tls.Config
	ClientTLSConfig *tls.Config

	// PEM-encoded certificates and keys for file writing if needed
	CACertPEM     []byte
	CAKeyPEM      []byte
	ServerCertPEM []byte
	ServerKeyPEM  []byte
	CAFilePath    string
}

CertPair holds a certificate pair with PEM-encoded representations for easy use

func NewTLSCertPair

func NewTLSCertPair(serverNames []string) (*CertPair, error)

NewTLSCertPair generates a new CA and server certificate pair for testing

func (*CertPair) CleanUp

func (t *CertPair) CleanUp() error

Jump to

Keyboard shortcuts

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