commandtest

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 11 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 commandtest runs a behavior's generated commands for the gen/cli_public_test.go each one gets, with the SDK call faked.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Method string
	Path   string
	Body   string
}

Request is what a command sent to the API.

func Sent

func Sent(
	t *testing.T,
	args []string,
) Request

Sent runs the command line args under osapi client, such as node sysctl update --target server1 --key vm.swappiness, through the command layer and the endpoint layer's runner, and returns the request the command sent to the API.

func SentWith

func SentWith(
	t *testing.T,
	args []string,
	stdin string,
) Request

SentWith is Sent with stdin as the command's standard input, which a secret flag reads for -.

Jump to

Keyboard shortcuts

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