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) ExecuteCommandWithOutputFile(command, outfileArg string, arg ...string) (string, error)
- func (e *MockExecutor) ExecuteCommandWithOutputFileTimeout(timeout time.Duration, command, outfileArg 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) MockExecuteCommandWithOutputFile func(command, outfileArg string, arg ...string) (string, error) MockExecuteCommandWithOutputFileTimeout func(timeout time.Duration, command, outfileArg 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 ¶
func (e *MockExecutor) ExecuteCommandWithCombinedOutput(command string, arg ...string) (string, error)
ExecuteCommandWithCombinedOutput mocks ExecuteCommandWithCombinedOutput
func (*MockExecutor) ExecuteCommandWithEnv ¶
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) ExecuteCommandWithOutputFile ¶
func (e *MockExecutor) ExecuteCommandWithOutputFile(command, outfileArg string, arg ...string) (string, error)
ExecuteCommandWithOutputFile mocks ExecuteCommandWithOutputFile
func (*MockExecutor) ExecuteCommandWithOutputFileTimeout ¶
func (e *MockExecutor) ExecuteCommandWithOutputFileTimeout(timeout time.Duration, command, outfileArg string, arg ...string) (string, error)
ExecuteCommandWithOutputFileTimeout mocks ExecuteCommandWithOutputFileTimeout
func (*MockExecutor) ExecuteCommandWithTimeout ¶
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.