testutil

package
v2.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func CleanupTmux(t *testing.T, tmuxTmpDir string)

CleanupTmux removes sessions from one explicitly validated temporary test socket. It never invokes tmux kill-server and refuses non-temporary paths.

func CleanupTmuxSocket

func CleanupTmuxSocket(t *testing.T, socket string)

CleanupTmuxSocket is the explicit-socket form for fixtures that pass -S.

func RequireIsolated

func RequireIsolated(t *testing.T)

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

type SSHFixture struct {
	Port    int
	KeyPath string
	// contains filtered or unexported fields
}

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.

Jump to

Keyboard shortcuts

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