test

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertContents

func AssertContents(t *testing.T, fs afero.Fs, expectedPath, contentPath string)

AssertContents asserts the contents of a file.

func AssertExists

func AssertExists(t *testing.T, fs afero.Fs, path string)

AssertExists asserts if a path exists.

func AssertNotExists

func AssertNotExists(t *testing.T, fs afero.Fs, path string)

AssertNotExists asserts a path does exist.

func AssertOutput

func AssertOutput(t *testing.T, filename, actual string)

AssertOutput asserts the output matches the actual contents

func ReadTestData

func ReadTestData(t *testing.T, name string) string

ReadTestData reads a file from `testdata` and returns it as a string.

func StageDir

func StageDir(t *testing.T, fs afero.Fs, src, dest string)

StageDir stages a directory on the provided filesystem from testdata.

func StageFile

func StageFile(t *testing.T, fs afero.Fs, src, dest string)

StageFile stages a file on on the provided filesystem from testdata.

func WithApp

func WithApp(t *testing.T, root string, fn func(*mocks.App, afero.Fs))

WithApp runs an enclosure with a mocked app and fs.

func WithAppFs

func WithAppFs(t *testing.T, root string, fs afero.Fs, fn func(*mocks.App, afero.Fs))

WithAppFs runs an enclosure with a mocked app and fs. Allow supplying the fs.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL