Documentation
¶
Overview ¶
Package testutil provides shared test helpers for internal packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualStringSlices ¶
EqualStringSlices reports whether two string slices have equal contents.
func FreeTCPPort ¶
FreeTCPPort returns an available localhost TCP port chosen from a per-process pseudo-random walk through a high, non-default port range. The listener is closed before returning, so callers still need to bind quickly, but this avoids repeated reuse of the same ephemeral port under parallel package execution.
func HermeticProcessEnv ¶
HermeticProcessEnv returns a child-process environment with credential-shaped and AGH/provider-local state removed, plus deterministic timezone and locale pins. It intentionally leaves HOME untouched; tests that need isolated AGH state should set AGH_HOME explicitly after calling this helper.
Types ¶
type HermeticEnv ¶
type HermeticEnv struct {
HomeDir string
ConfigHomeDir string
ProviderHomeDir string
ProviderCodexDir string
ClaudeConfigDir string
CodexHomeDir string
OpenCodeHomeDir string
}
HermeticEnv captures deterministic environment paths applied by ApplyHermeticEnv.
func ApplyHermeticEnv ¶
func ApplyHermeticEnv(t testing.TB) HermeticEnv
ApplyHermeticEnv scrubs ambient credentials and pins deterministic env values for tests that intentionally exercise process environment, AGH_HOME, provider home, or release shell behavior. It mutates process environment and therefore must not be used by tests that call t.Parallel.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd/acpmock-driver
command
|
|
|
Package e2e provides shared runtime and artifact helpers for daemon-level end-to-end tests.
|
Package e2e provides shared runtime and artifact helpers for daemon-level end-to-end tests. |