testutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testutil — testcontainers helpers for the pgchannel provider tests.

Each helper is no-op-on-skip when Docker is not available; the caller can trust that returning from a helper means the test environment is ready.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustStartTestPostgres

func MustStartTestPostgres(t *testing.T) string

MustStartTestPostgres spins up a fresh Postgres container with the pgchannel schema pre-loaded and returns its DSN. The container is torn down via t.Cleanup at the end of the test.

If Docker is unavailable in the current environment the test is SKIPPED (via testcontainers.SkipIfProviderIsNotHealthy) rather than failed — pgchannel tests are not gated on the unit-test runner having Docker.

Callers should treat the returned DSN as opaque and pass it directly into pgchannel.OpenConnection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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