clienv

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsolateConfigHome

func IsolateConfigHome(t testing.TB) string

func IsolateConfigHomeAllowDefault

func IsolateConfigHomeAllowDefault(t testing.TB) string

func RunExpectError

func RunExpectError(t testing.TB, run RunFn, args []string, wantErrSubstr string) string

RunExpectError invokes run with args and asserts that it returns a non-nil error whose message contains wantErrSubstr. Returns the writer contents so callers can make additional assertions on usage output.

func RunExpectOK

func RunExpectOK(t testing.TB, run RunFn, args []string) string

RunExpectOK invokes run with args and asserts that it returns no error. Returns the writer contents so callers can assert on stdout/stderr output.

func RunHelp

func RunHelp(t testing.TB, run RunFn, baseArgs []string, wantContains ...string)

RunHelp asserts that both `--help` and `-h` invocations of baseArgs succeed and emit output containing each wantContains substring.

func UseControlPlaneEnv

func UseControlPlaneEnv(t testing.TB, baseURL string)

func UseControlPlaneEnvWithToken

func UseControlPlaneEnvWithToken(t testing.TB, baseURL, token string)

Types

type RunFn

type RunFn func([]string, io.Writer) error

RunFn is the common signature for cmd/ploy CLI entry points: any function that takes argv-style arguments and writes user-facing output to a writer.

Jump to

Keyboard shortcuts

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