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: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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