Documentation ¶
Overview ¶
Package testing provides fake implementations of the exec package.
These implementations can be used to mock out the Executor in tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorExecutor ¶
type ErrorExecutor struct {
FakeExecutor
}
type FailLaterExecutor ¶
type FailLaterExecutor struct { FakeExecutor Succeeds int64 // contains filtered or unexported fields }
FailLaterExecutor is the opposite of RetryExecutor. It fails after N Succeeds.
type FakeExecutor ¶
func (*FakeExecutor) ExecutedCmd ¶
func (e *FakeExecutor) ExecutedCmd(cmd string, args []string) bool
func (*FakeExecutor) GetCommands ¶
func (e *FakeExecutor) GetCommands(cmdName string) []command
type RetryExecutor ¶
type RetryExecutor struct { FakeExecutor // How many times will it fail before succeeding? Failures int64 // contains filtered or unexported fields }
RetryExecutor succeeds after N failures.
Click to show internal directories.
Click to hide internal directories.