podman

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

package: podman / tools type: test-support job: run a throwaway container for an adapter's real-counterpart test, on a free port, torn down after limits: a test helper; it skips without podman and waits for the port, not for readiness

Package podman is the shared boilerplate for the real-counterpart adapter tests (OpenBao for the vault and signer ports, and more to come). An adapter's only meaningful test drives its real backend, spun up here via podman; Run publishes the container on a free host port, returns that address plus a teardown, and skips the test when podman is not installed so the offline gate stays green.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t testing.TB, spec Spec) (addr string, teardown func())

Run starts spec's container on a free host port and returns its host address (127.0.0.1:PORT) plus a teardown that removes it. It skips the test when podman is not installed, and waits until the published port accepts connections; the caller performs any service-specific readiness (e.g. an unseal/health check).

Types

type Spec

type Spec struct {
	Image string            // image reference, e.g. ghcr.io/openbao/openbao:latest
	Port  int               // container port to publish
	Env   map[string]string // environment variables
	Args  []string          // command + args after the image
}

Spec describes a container to run for a test.

Jump to

Keyboard shortcuts

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