Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckStringDivergence ¶
Very useful when debugging outputs that don't match up.
func RunTestAndCaptureStdout ¶
func RunTestAndCaptureStdout( fn actionFn, ) (out []*exec.Output, retErr []error, result bool, debug string)
For some tests we need to capture stdout for validation with expected output. Code here is based on various similar code snippets found by googling StackOverflow and the like.
Types ¶
type ExpectedError ¶
type ExpectedError struct {
// contains filtered or unexported fields
}
func NewExpectedError ¶
func NewExpectedError(expect string) *ExpectedError
type ExpectedMessages ¶
type ExpectedMessages struct {
// contains filtered or unexported fields
}
func NewExpectedMessages ¶
func NewExpectedMessages(expect ...string) *ExpectedMessages
func (*ExpectedMessages) ContainedIn ¶
func (e *ExpectedMessages) ContainedIn(t *testing.T, actual string)
func (*ExpectedMessages) ContainedInAny ¶
func (e *ExpectedMessages) ContainedInAny(t *testing.T, actual []string)
Check each expected message appears in at least one of the actual strings.
func (*ExpectedMessages) ContainedInOrderIn ¶
func (e *ExpectedMessages) ContainedInOrderIn(t *testing.T, actual string)
func (*ExpectedMessages) NotContainedIn ¶
func (e *ExpectedMessages) NotContainedIn(t *testing.T, actual string)
Click to show internal directories.
Click to hide internal directories.