runner

package
v0.123.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 3 modules, 2 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 RunSuccessfully

func RunSuccessfully() types.GomegaMatcher

RunSuccessfully matches successful execution of a command

func RunSuccessfullyWithOutputString

func RunSuccessfullyWithOutputString(outputMatchers ...types.GomegaMatcher) types.GomegaMatcher

RunSuccessfullyWithOutputString matches successful execution of a command and passes the output string to another matcher (the string will include stdout and stderr)

func RunSuccessfullyWithOutputStringLines

func RunSuccessfullyWithOutputStringLines(outputMatchers ...types.GomegaMatcher) types.GomegaMatcher

RunSuccessfullyWithOutputStringLines matches successful execution of a command and passes the output string to another matcher split into lines (the string will include stdout and stderr)

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

Cmd holds definition of a command

func NewCmd

func NewCmd(execPath string) Cmd

NewCmd constructs a new command

func (Cmd) Run

func (c Cmd) Run() *gexec.Session

Run the command and wait for it to return

func (Cmd) Start

func (c Cmd) Start() *gexec.Session

Start the command and returns underlying session

func (Cmd) String

func (c Cmd) String() string

NewCmd presents a the command as a string; each argument is quoted, so that the command can be copied and called from a shell

func (Cmd) WithArgs

func (c Cmd) WithArgs(args ...string) Cmd

WithArgs returns a copy of the command with new arguments

func (Cmd) WithCleanEnv

func (c Cmd) WithCleanEnv() Cmd

WithCleanEnv returns a copy of the command with all environment variables reset (including OS environment variables)

func (Cmd) WithEnv

func (c Cmd) WithEnv(env ...string) Cmd

WithEnv returns a copy of the command with new environment variables

func (Cmd) WithStdin

func (c Cmd) WithStdin(stdin io.Reader) Cmd

WithStdin returns a copy of the command with Stdin set

func (Cmd) WithTimeout

func (c Cmd) WithTimeout(timeout time.Duration) Cmd

WithTimeout returns a copy of the command with new timeout value

func (Cmd) WithoutArg

func (c Cmd) WithoutArg(arg, val string) Cmd

WithoutArg removes an existing argument

Jump to

Keyboard shortcuts

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