require

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package require provides conditional-skip helpers for e2e tests. Each helper checks whether a required infrastructure is available (via env var or runtime probe) and skips the test if absent — never fails. Wraps the analyzer-required if-conditional pattern.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Docker

func Docker(t *testing.T)

Docker skips the test if Docker is not available. Detection probes the DOCKER_HOST env var first, then the default /var/run/docker.sock unix socket (1-second timeout). Set GOCELL_E2E_DOCKER_AVAILABLE=1 in CI to bypass the probe and trust that docker compose is already running.

Analyzer false-positive risk: the skip call inside testutil.RequireDocker is already guarded by an if-conditional (if dockerAvailable()), so it is never an unconditional first statement at the call site. The unconditionalskip analyzer will not flag this function.

func PG

func PG(t *testing.T)

PG skips the test if a PostgreSQL instance is not available. Set GOCELL_E2E_PG_AVAILABLE=1 in CI when a real Postgres is reachable.

func RMQ

func RMQ(t *testing.T)

RMQ skips the test if a RabbitMQ broker is not available. Set GOCELL_E2E_RMQ_AVAILABLE=1 in CI when a real RabbitMQ is reachable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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