Documentation ¶
Index ¶
- func AssertEqualFileText(t *testing.T, expectedFile string, actualFile string) error
- func AssertFileContains(t *testing.T, fileName string, containsText string)
- func AssertFileDoesNotContain(t *testing.T, fileName string, containsText string)
- func AssertFileDoesNotExist(t *testing.T, fileName string) bool
- func AssertFileExists(t *testing.T, fileName string) bool
- func AssertFilesExist(t *testing.T, expected bool, paths ...string)
- func AssertLoadFileText(t *testing.T, fileName string) (string, error)
- func AssertTextFileContentsEqual(t *testing.T, expectedFile string, actualFile string)
- func CreateAuthConfigService() auth.ConfigService
- func Debugf(message string, args ...interface{})
- func ExpectString(t *testing.T, console *expect.Console, s string)
- func IsDebugLog() bool
- func Output() terminal.FileWriter
- func SkipForWindows(t *testing.T, reason string)
- func TestCloser(t *testing.T, closer io.Closer)
- func TestShouldDisableMaven() bool
- type ConsoleWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqualFileText ¶
func AssertFileContains ¶
AssertFileContains asserts that a given file exists and contains the given text
func AssertFileDoesNotContain ¶ added in v1.3.861
AssertFileDoesNotContain asserts that a given file exists and does not contain the given text
func AssertFileDoesNotExist ¶
AssertFileDoesNotExist asserts that the given file does not exist
func AssertFileExists ¶
AssertFileExists asserts that the given file exists
func AssertFilesExist ¶
AssertFilesExist asserts that the list of file paths either exist or don't exist
func AssertLoadFileText ¶
AssertLoadFileText asserts that the given file name can be loaded and returns the string contents
func AssertTextFileContentsEqual ¶
AssertTextFileContentsEqual asserts that both the expected and actual files can be loaded as text and that their contents are identical
func CreateAuthConfigService ¶
func CreateAuthConfigService() auth.ConfigService
CreateAuthConfigService creates and returns a fixture ConfigService
func ExpectString ¶
ExpectString does the same as the go-expect console.ExpectString method, but also reports failures to the testing object in a sensible format
func SkipForWindows ¶
SkipForWindows skips tests if they are running on Windows This is to be used for valid tests that just don't work on windows for whatever reason
func TestShouldDisableMaven ¶
func TestShouldDisableMaven() bool
TestShouldDisableMaven should disable maven
Types ¶
type ConsoleWrapper ¶
ConsoleWrapper is a wrapper around the go-expect Console that takes a test object and will report failures This prevents users having to manually detect and report errors during the tests
func NewTerminal ¶
func NewTerminal(t *testing.T) *ConsoleWrapper
NewTerminal mock terminal to control stdin and stdout
func (*ConsoleWrapper) CurrentState ¶
func (c *ConsoleWrapper) CurrentState() string
CurrentState gets the last line of text currently on the console
func (*ConsoleWrapper) ExpectEOF ¶
func (c *ConsoleWrapper) ExpectEOF()
ExpectEOF expects an EOF to be present on the console and reports an error if it is not
func (*ConsoleWrapper) ExpectString ¶
func (c *ConsoleWrapper) ExpectString(s string)
ExpectString expects a string to be present on the console and fails the test if it is not
func (*ConsoleWrapper) SendLine ¶
func (c *ConsoleWrapper) SendLine(s string)
SendLine sends a string to the console and fails the test if something goes wrong