Documentation ¶
Index ¶
- type MockExecutor
- func (e *MockExecutor) ExecuteCommand(command string, arg ...string) error
- func (e *MockExecutor) ExecuteCommandWithCombinedOutput(command string, arg ...string) (string, error)
- func (e *MockExecutor) ExecuteCommandWithEnv(env []string, command string, arg ...string) error
- func (e *MockExecutor) ExecuteCommandWithOutput(command string, arg ...string) (string, error)
- func (e *MockExecutor) ExecuteCommandWithTimeout(timeout time.Duration, command string, arg ...string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockExecutor ¶
type MockExecutor struct { MockExecuteCommand func(command string, arg ...string) error MockExecuteCommandWithEnv func(env []string, command string, arg ...string) error MockStartExecuteCommand func(command string, arg ...string) (*exec.Cmd, error) MockExecuteCommandWithOutput func(command string, arg ...string) (string, error) MockExecuteCommandWithCombinedOutput func(command string, arg ...string) (string, error) MockExecuteCommandWithTimeout func(timeout time.Duration, command string, arg ...string) (string, error) }
MockExecutor mocks all the exec commands
func (*MockExecutor) ExecuteCommand ¶
func (e *MockExecutor) ExecuteCommand(command string, arg ...string) error
ExecuteCommand mocks ExecuteCommand
func (*MockExecutor) ExecuteCommandWithCombinedOutput ¶ added in v0.3.0
func (e *MockExecutor) ExecuteCommandWithCombinedOutput(command string, arg ...string) (string, error)
ExecuteCommandWithCombinedOutput mocks ExecuteCommandWithCombinedOutput
func (*MockExecutor) ExecuteCommandWithEnv ¶ added in v1.7.3
func (e *MockExecutor) ExecuteCommandWithEnv(env []string, command string, arg ...string) error
ExecuteCommandWithEnv mocks ExecuteCommandWithEnv
func (*MockExecutor) ExecuteCommandWithOutput ¶
func (e *MockExecutor) ExecuteCommandWithOutput(command string, arg ...string) (string, error)
ExecuteCommandWithOutput mocks ExecuteCommandWithOutput
func (*MockExecutor) ExecuteCommandWithTimeout ¶ added in v0.6.0
func (e *MockExecutor) ExecuteCommandWithTimeout(timeout time.Duration, command string, arg ...string) (string, error)
ExecuteCommandWithTimeout mocks ExecuteCommandWithTimeout
Click to show internal directories.
Click to hide internal directories.