commands

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 15 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 commands checks a CommandService implementation through its gRPC client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

NewClient serves srv on an in-process listener for the test's lifetime and returns its client.

func Run

func Run(t *testing.T, h Harness)

Run runs the suite.

Types

type Harness

type Harness struct {
	Client func(t *testing.T) executorv1.CommandServiceClient
	// Succeed writes "out" to stdout and "err" to stderr, then exits 0.
	Succeed string
	// Fail exits with status 3.
	Fail string
	// Block writes "ready" to stdout, then runs until killed.
	Block string
	// BlockWithChild is Block with a background child that outlives its shell.
	BlockWithChild string
	// ChildGone returns nil once every BlockWithChild process has ended.
	ChildGone func(ctx context.Context) error
	// Survivor exits 0, leaving a process that survives the kill.
	Survivor string
	// Context is sent with every call; nil sends an empty one.
	Context client.RequestContextFunc
}

Harness supplies the client and the commands that produce each scenario.

Jump to

Keyboard shortcuts

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