Documentation ¶
Index ¶
- func RunSuccessfully() types.GomegaMatcher
- func RunSuccessfullyWithOutputString(outputMatchers ...types.GomegaMatcher) types.GomegaMatcher
- func RunSuccessfullyWithOutputStringLines(outputMatchers ...types.GomegaMatcher) types.GomegaMatcher
- type Cmd
- func (c Cmd) Run() *gexec.Session
- func (c Cmd) Start() *gexec.Session
- func (c Cmd) String() string
- func (c Cmd) WithArgs(args ...string) Cmd
- func (c Cmd) WithCleanEnv() Cmd
- func (c Cmd) WithEnv(env ...string) Cmd
- func (c Cmd) WithStdin(stdin io.Reader) Cmd
- func (c Cmd) WithTimeout(timeout time.Duration) Cmd
- func (c Cmd) WithoutArg(arg, val string) Cmd
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 (Cmd) 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) WithCleanEnv ¶
WithCleanEnv returns a copy of the command with all environment variables reset (including OS environment variables)
func (Cmd) WithTimeout ¶
WithTimeout returns a copy of the command with new timeout value
func (Cmd) WithoutArg ¶
WithoutArg removes an existing argument