Documentation
¶
Overview ¶
Package stubtool is a test double for passthrough tools (kubectl, helm, …). A test binary whose argv[0] basename is a tool name runs Main instead of its tests (see TestMain in internal/passthrough and cmd/obol), so the same binary serves as both the code under test and the tool it launches.
Behaviour, driven by env:
STUB_EXIT=<n> exit with status n (default 0) STUB_SIGNAL=TERM kill itself with SIGTERM after reporting STUB_SLEEP=<dur> sleep before exiting (signal tests)
It writes one JSON Report line to stdout. `<tool> __complete <args…>` instead answers with cobra-style completion lines (see Main).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Names = []string{"kubectl", "helm", "helmfile", "k9s", "stubtool"}
Names are the argv[0] basenames that select stub mode.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.