Documentation ¶
Index ¶
- func AssertContents(t *testing.T, fs afero.Fs, expectedPath, contentPath string)
- func AssertDirectoriesMatch(t *testing.T, fs afero.Fs, rootA string, rootB string)
- func AssertExists(t *testing.T, fs afero.Fs, path string)
- func AssertExpectedPaths(t *testing.T, fs afero.Fs, root string, expected []string)
- func AssertNotExists(t *testing.T, fs afero.Fs, path string)
- func AssertOutput(t *testing.T, filename, actual string)
- func DumpFs(t *testing.T, fs afero.Fs)
- func FakeHTTPClient(resp *http.Response, err error) *http.Client
- func ReadTestData(t *testing.T, name string) string
- func StageDir(t *testing.T, fs afero.Fs, src, dest string)
- func StageFile(t *testing.T, fs afero.Fs, src, dest string)
- func WithApp(t *testing.T, root string, fn func(*mocks.App, afero.Fs))
- func WithAppFs(t *testing.T, root string, fs afero.Fs, fn func(*mocks.App, afero.Fs))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertContents ¶
AssertContents asserts the contents of a file.
func AssertDirectoriesMatch ¶ added in v0.12.0
AssertDirectoriesMatch compares the contents of two directories (recursively) and asserts they are equivelent.
func AssertExists ¶
AssertExists asserts if a path exists.
func AssertExpectedPaths ¶ added in v0.13.0
AssertExpectedPaths compares the contents of a path with a set of expected paths
func AssertNotExists ¶
AssertNotExists asserts a path does exist.
func AssertOutput ¶
AssertOutput asserts the output matches the actual contents
func DumpFs ¶ added in v0.12.0
dumpFs logs the contents of an afero.Fs virtual filesystem interface.
func FakeHTTPClient ¶ added in v0.13.0
FakeHTTPClient returns an http.Client that will respond with the predefined response and error.
func ReadTestData ¶
ReadTestData reads a file from `testdata` and returns it as a string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.