Documentation ¶
Index ¶
- type CmdResult
- func (r CmdResult) AssertCode(t *testing.T, code int) bool
- func (r CmdResult) AssertError(t *testing.T) bool
- func (r CmdResult) AssertErrorMatch(t *testing.T, re interface{}) bool
- func (r CmdResult) AssertSuccess(t *testing.T) bool
- func (r CmdResult) AssertSuccessMatch(t *testing.T, re interface{}) bool
- func (r CmdResult) Code() int
- func (r CmdResult) Stderr() string
- func (r CmdResult) Stdout() string
- func (r CmdResult) Success() bool
- type Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdResult ¶
type CmdResult struct {
// contains filtered or unexported fields
}
CmdResult represents a command execution result
func ExecCommand ¶
ExecCommand executes the provided command and returns a CmdResult
func (CmdResult) AssertCode ¶
AssertCode asserts that the command exit code matched the provided one
func (CmdResult) AssertError ¶
AssertError asserts that the command failed
func (CmdResult) AssertErrorMatch ¶
AssertErrorMatch asserts that the command failed and its stderr matches the provided regexp
func (CmdResult) AssertSuccess ¶
AssertSuccess asserts that the command succeeded (0 exit code)
func (CmdResult) AssertSuccessMatch ¶
AssertSuccessMatch asserts that the command succeeded and its stdout matches the provided regexp
Click to show internal directories.
Click to hide internal directories.