test

package
v1.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL