Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetFs func() afero.Fs
GetFs is a function that returns an Fs
View Source
var SetFs func(fs afero.Fs)
SetFs sets an app Fs
Functions ¶
func IsHelper ¶ added in v0.2.0
func IsHelper() bool
IsHelper returns true if a process helper is wanted
func ReplaceFs ¶
func ReplaceFs() func()
ReplaceFs replaces the real filesystem by a memory implementation
func TestFailRunHelper ¶ added in v0.12.0
func TestFailRunHelper()
TestFailRunHelper is a non zero exiting testing helper for go test subprocess mocking.
func TestSummonRunHelper ¶ added in v0.12.0
func TestSummonRunHelper()
TestSummonRunHelper is a testing helper for go test subprocess mocking
Types ¶
type FakeCommand ¶ added in v0.16.0
func FakeExecCommand ¶
func FakeExecCommand(testToCall string) *FakeCommand
FakeExecCommand returns a FakeCommand which can record calls this is used to mock an exec.Cmd Adapted from https://npf.io/2015/06/testing-exec-command/
func (*FakeCommand) GetCalls ¶ added in v0.16.0
func (fc *FakeCommand) GetCalls() []Call
Click to show internal directories.
Click to hide internal directories.