mock

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecInfo

type ExecInfo struct {
	Expected string
	Returned *command.ExecResult
}

type ExecInfoList

type ExecInfoList []ExecInfo

type ExecProviderFunction

type ExecProviderFunction func(int, *testing.T, string, ...string) *command.ExecResult

type MockExecutor

type MockExecutor struct {
	CallNum int
	// contains filtered or unexported fields
}

func NewMockExecutorFromInfos

func NewMockExecutorFromInfos(t *testing.T, execInfos ...*ExecInfo) *MockExecutor

func NewMockExecutorFromSlices

func NewMockExecutorFromSlices(t *testing.T, expected []string, returned []*command.ExecResult) (*MockExecutor, error)

func (*MockExecutor) RunCommand

func (e *MockExecutor) RunCommand(cmd string, args ...string) *command.ExecResult

func (*MockExecutor) RunCommandWithRetries

func (e *MockExecutor) RunCommandWithRetries(retries int, okExitCodes []int, cmd string,
	args ...string) *command.ExecResult

func (*MockExecutor) RunCommandWithRetriesAndDelay

func (e *MockExecutor) RunCommandWithRetriesAndDelay(retries int, retryWaitMilliseconds int,
	okExitCodes []int, cmd string, args ...string) *command.ExecResult

func (*MockExecutor) ValidateCallNum

func (e *MockExecutor) ValidateCallNum()

Jump to

Keyboard shortcuts

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