Documentation ¶
Index ¶
- Variables
- func AssertInterfaceListEquals(t mock.TestingT, expected []interface{}, actual []interface{})
- func AssertStringListEquals(t mock.TestingT, expected []string, actual []string)
- func ByteToStringArray(input []interface{}) []string
- func ExpectLogs(t mock.TestingT, setExpectedCalls func(*MockLogger)) func()
- func ExpectPanic(t mock.TestingT, expectedErr interface{}, f func())
- func LookPathOrAbort(binaryName string) string
- func Panicf(msg string, args ...interface{})
- func RequireArguments(e interface{}, n int, args []interface{})
- func RequireArgumentsAtLeast(e interface{}, n int, args []interface{})
- func RequireNoArguments(e interface{}, args []interface{})
- func RequireOnPath(requiredBy interface{}, binaryName string)
- func WithLogAssertions(t mock.TestingT, f func(*MockLogger))
- type CommandRunner
- type CommandRunnerOutputs
- type DummyError
- type InteractiveCommandRunner
- type InteractiveCommandRunnerJob
- type MockCommandRunner
- type MockInteractiveCommandRunner
- type MockLogger
- func (m *MockLogger) Alert(args ...interface{})
- func (m *MockLogger) Alertf(format string, args ...interface{})
- func (m *MockLogger) Close() error
- func (m *MockLogger) Critical(args ...interface{})
- func (m *MockLogger) Criticalf(format string, args ...interface{})
- func (m *MockLogger) Debug(args ...interface{})
- func (m *MockLogger) Debugf(format string, args ...interface{})
- func (m *MockLogger) Emergency(args ...interface{})
- func (m *MockLogger) Emergencyf(format string, args ...interface{})
- func (m *MockLogger) Error(args ...interface{})
- func (m *MockLogger) Errorf(format string, args ...interface{})
- func (m *MockLogger) ExpectDebugf(format string, args ...interface{}) *mock.Call
- func (m *MockLogger) ExpectInfof(format string, args ...interface{}) *mock.Call
- func (m *MockLogger) Info(args ...interface{})
- func (m *MockLogger) Infof(format string, args ...interface{})
- func (m *MockLogger) Log(level log.Level, args ...interface{})
- func (m *MockLogger) LogAlert() bool
- func (m *MockLogger) LogCritical() bool
- func (m *MockLogger) LogDebug() bool
- func (m *MockLogger) LogEmergency() bool
- func (m *MockLogger) LogError() bool
- func (m *MockLogger) LogInfo() bool
- func (m *MockLogger) LogLevel(level log.Level) bool
- func (m *MockLogger) LogNotice() bool
- func (m *MockLogger) LogWarning() bool
- func (m *MockLogger) Logf(level log.Level, format string, args ...interface{})
- func (m *MockLogger) Notice(args ...interface{})
- func (m *MockLogger) Noticef(format string, args ...interface{})
- func (m *MockLogger) Warning(args ...interface{})
- func (m *MockLogger) Warningf(format string, args ...interface{})
- type RealCommandRunner
- type RealInteractiveCommandRunner
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AssertStringListEquals ¶
func ByteToStringArray ¶ added in v0.1.3
func ByteToStringArray(input []interface{}) []string
func ExpectLogs ¶
func ExpectLogs(t mock.TestingT, setExpectedCalls func(*MockLogger)) func()
func ExpectPanic ¶
func LookPathOrAbort ¶
func RequireArguments ¶
func RequireArguments(e interface{}, n int, args []interface{})
func RequireArgumentsAtLeast ¶
func RequireArgumentsAtLeast(e interface{}, n int, args []interface{})
func RequireNoArguments ¶
func RequireNoArguments(e interface{}, args []interface{})
func RequireOnPath ¶
func RequireOnPath(requiredBy interface{}, binaryName string)
func WithLogAssertions ¶
func WithLogAssertions(t mock.TestingT, f func(*MockLogger))
Types ¶
type CommandRunner ¶
type CommandRunnerOutputs ¶
type DummyError ¶
type DummyError struct {
Msg string
}
func (DummyError) Error ¶
func (e DummyError) Error() string
type InteractiveCommandRunner ¶
type InteractiveCommandRunner interface { Run(job InteractiveCommandRunnerJob) RunParallel(jobs []InteractiveCommandRunnerJob) }
type InteractiveCommandRunnerJob ¶
func (InteractiveCommandRunnerJob) Command ¶
func (job InteractiveCommandRunnerJob) Command() *exec.Cmd
type MockCommandRunner ¶
func (*MockCommandRunner) CombinedOutputOrPanic ¶
func (r *MockCommandRunner) CombinedOutputOrPanic(name string, args []string) []byte
func (*MockCommandRunner) CombinedOutputWithStdinOrPanic ¶
func (*MockCommandRunner) Outputs ¶
func (r *MockCommandRunner) Outputs(name string, args []string) CommandRunnerOutputs
type MockInteractiveCommandRunner ¶
func (*MockInteractiveCommandRunner) Run ¶
func (r *MockInteractiveCommandRunner) Run(job InteractiveCommandRunnerJob)
func (*MockInteractiveCommandRunner) RunParallel ¶
func (r *MockInteractiveCommandRunner) RunParallel(jobs []InteractiveCommandRunnerJob)
type MockLogger ¶
func (*MockLogger) Alert ¶
func (m *MockLogger) Alert(args ...interface{})
func (*MockLogger) Alertf ¶
func (m *MockLogger) Alertf(format string, args ...interface{})
func (*MockLogger) Close ¶
func (m *MockLogger) Close() error
func (*MockLogger) Critical ¶
func (m *MockLogger) Critical(args ...interface{})
func (*MockLogger) Criticalf ¶
func (m *MockLogger) Criticalf(format string, args ...interface{})
func (*MockLogger) Debug ¶
func (m *MockLogger) Debug(args ...interface{})
func (*MockLogger) Debugf ¶
func (m *MockLogger) Debugf(format string, args ...interface{})
func (*MockLogger) Emergency ¶
func (m *MockLogger) Emergency(args ...interface{})
func (*MockLogger) Emergencyf ¶
func (m *MockLogger) Emergencyf(format string, args ...interface{})
func (*MockLogger) Error ¶
func (m *MockLogger) Error(args ...interface{})
func (*MockLogger) Errorf ¶
func (m *MockLogger) Errorf(format string, args ...interface{})
func (*MockLogger) ExpectDebugf ¶
func (m *MockLogger) ExpectDebugf(format string, args ...interface{}) *mock.Call
func (*MockLogger) ExpectInfof ¶
func (m *MockLogger) ExpectInfof(format string, args ...interface{}) *mock.Call
func (*MockLogger) Info ¶
func (m *MockLogger) Info(args ...interface{})
func (*MockLogger) Infof ¶
func (m *MockLogger) Infof(format string, args ...interface{})
func (*MockLogger) Log ¶
func (m *MockLogger) Log(level log.Level, args ...interface{})
func (*MockLogger) LogAlert ¶
func (m *MockLogger) LogAlert() bool
func (*MockLogger) LogCritical ¶
func (m *MockLogger) LogCritical() bool
func (*MockLogger) LogDebug ¶
func (m *MockLogger) LogDebug() bool
func (*MockLogger) LogEmergency ¶
func (m *MockLogger) LogEmergency() bool
func (*MockLogger) LogError ¶
func (m *MockLogger) LogError() bool
func (*MockLogger) LogInfo ¶
func (m *MockLogger) LogInfo() bool
func (*MockLogger) LogNotice ¶
func (m *MockLogger) LogNotice() bool
func (*MockLogger) LogWarning ¶
func (m *MockLogger) LogWarning() bool
func (*MockLogger) Logf ¶
func (m *MockLogger) Logf(level log.Level, format string, args ...interface{})
func (*MockLogger) Notice ¶
func (m *MockLogger) Notice(args ...interface{})
func (*MockLogger) Noticef ¶
func (m *MockLogger) Noticef(format string, args ...interface{})
func (*MockLogger) Warning ¶
func (m *MockLogger) Warning(args ...interface{})
func (*MockLogger) Warningf ¶
func (m *MockLogger) Warningf(format string, args ...interface{})
type RealCommandRunner ¶
type RealCommandRunner struct{}
func (RealCommandRunner) CombinedOutputOrPanic ¶
func (c RealCommandRunner) CombinedOutputOrPanic(name string, args []string) []byte
func (RealCommandRunner) CombinedOutputWithStdinOrPanic ¶
func (RealCommandRunner) Outputs ¶
func (c RealCommandRunner) Outputs(name string, args []string) CommandRunnerOutputs
type RealInteractiveCommandRunner ¶
type RealInteractiveCommandRunner struct{}
func (RealInteractiveCommandRunner) Run ¶
func (e RealInteractiveCommandRunner) Run(job InteractiveCommandRunnerJob)
func (RealInteractiveCommandRunner) RunParallel ¶
func (e RealInteractiveCommandRunner) RunParallel(jobs []InteractiveCommandRunnerJob)
Click to show internal directories.
Click to hide internal directories.