termtest

package
v0.0.251 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 20 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAgentTerm

func BuildAgentTerm(t *testing.T, start string) string

BuildAgentTerm builds the agent-term binary for doctest harnesses. start is typically d.DOCTEST_ROOT so the walk can find the repo-root go.mod even when the generated test's cwd is a temp directory.

func PickFreePort

func PickFreePort(base int) (int, error)

PickFreePort finds an available TCP port near base.

Types

type Request

type Request struct {
	Phase string

	Args       []string
	ListenAddr string
	DaemonPort int

	StartDaemon        bool
	EnsureNoDaemon     bool
	RenameBeforeAttach string
	WebSessionName     string
	RunCommand         []string
	DetachSignal       bool
	RunProbeSeconds    int
	RequireGrok        bool

	AgentTermBin string
	DaemonAddr   string
}

Request is the doctest harness request for agent-term CLI tests.

type Response

type Response struct {
	ExitCode   int
	Stdout     string
	Stderr     string
	Combined   string
	HTTPStatus int
	HTTPBody   string
	DaemonPort int

	DaemonStderr        string
	SessionStillRunning bool
	DetachedSessionID   string
}

Response is the doctest harness response for agent-term CLI tests.

func Run

func Run(t *testing.T, req *Request) (*Response, error)

Run executes an agent-term doctest phase.

Jump to

Keyboard shortcuts

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