Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdRunner ¶
type CmdRunner struct {
// contains filtered or unexported fields
}
func NewCmdRunner ¶
type CommandMaker ¶
type CommandMaker interface {
Command(name string, arg ...string) CommandRunner
}
type CommandRunner ¶
type FakeBoolClock ¶
type FakeBoolClock struct {
// contains filtered or unexported fields
}
func NewFakeBoolClock ¶
func NewFakeBoolClock(times []time.Time, toChange *bool) *FakeBoolClock
func (*FakeBoolClock) Now ¶
func (f *FakeBoolClock) Now() time.Time
func (*FakeBoolClock) TimesCalled ¶
func (f *FakeBoolClock) TimesCalled() int
type FakeClock ¶
type FakeClock struct {
// contains filtered or unexported fields
}
Provides a specified time object for each call to time.Now() in a given test case
func (*FakeClock) TimesCalled ¶
type FakeCommandMaker ¶
type FakeCommandMaker struct {
// contains filtered or unexported fields
}
Used along with FakeCommandRunner to provide a set of responses to CmdRunner execution in a given test case
func NewFakeCommandMaker ¶
func NewFakeCommandMaker(msg []string, err []bool, repeat bool) *FakeCommandMaker
func (*FakeCommandMaker) Command ¶
func (c *FakeCommandMaker) Command(name string, arg ...string) CommandRunner
func (*FakeCommandMaker) TimesCalled ¶
func (c *FakeCommandMaker) TimesCalled() int
type FakeCommandRunner ¶
type FakeCommandRunner struct {
// contains filtered or unexported fields
}
Provide a response to a single CmdRunner execution
func NewFakeCommand ¶
func NewFakeCommand(msg string, isErr bool) *FakeCommandRunner
func (*FakeCommandRunner) Output ¶
func (e *FakeCommandRunner) Output() ([]byte, error)
func (*FakeCommandRunner) Run ¶
func (e *FakeCommandRunner) Run() error
func (*FakeCommandRunner) Start ¶
func (e *FakeCommandRunner) Start() error
type ProbeClock ¶
type ProbeClock struct{}
func (*ProbeClock) Now ¶
func (p *ProbeClock) Now() time.Time
Click to show internal directories.
Click to hide internal directories.