Documentation
¶
Overview ¶
Package testutil contains small safety helpers shared by real-process tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupTmux ¶
CleanupTmux removes sessions from one explicitly validated temporary test socket. It never invokes tmux kill-server and refuses non-temporary paths.
func CleanupTmuxSocket ¶
CleanupTmuxSocket is the explicit-socket form for fixtures that pass -S.
func LecternBinary ¶ added in v2.7.0
LecternBinary builds cmd/lectern once per test process, for tests that run target-side helpers (`lectern helper NAME …`) the way a target does.
func RequireIsolated ¶
RequireIsolated prevents real-process tests from being run against the operator's tmux server. The reviewed test runner sets this only inside its bwrap namespace.
Types ¶
type SSHFixture ¶
func NewSSHFixture ¶
func NewSSHFixture(t *testing.T) *SSHFixture
NewSSHFixture starts a key-authenticated shell server on an ephemeral loopback port. It is deliberately scoped to the test process and has no access to host network namespaces when invoked by the reviewed runner.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package lecternbin lets a test binary stand in for the lectern binary on a target.
|
Package lecternbin lets a test binary stand in for the lectern binary on a target. |
|
Package ptytest gives a test its own PTY host socket.
|
Package ptytest gives a test its own PTY host socket. |