testhelpers

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendExecInfos

func AppendExecInfos(infoSlices ...[]*cmdmock.ExecInfo) []*cmdmock.ExecInfo

AppendExecInfos merges multiple []*ExecInfo slices into one

func ExecResultExitCodeErrOutput

func ExecResultExitCodeErrOutput(exitCode int, errOut string) *command.ExecResult

func ExecResultExitCodeNoOutput

func ExecResultExitCodeNoOutput(exitCode int) *command.ExecResult

func ExecResultExitCodeStdErrOutput

func ExecResultExitCodeStdErrOutput(exitCode int, stdOut, errOut string) *command.ExecResult

func ExecResultExitCodeStdOutput

func ExecResultExitCodeStdOutput(exitCode int, stdOut string) *command.ExecResult

func ExecResultGrepFound

func ExecResultGrepFound(stdOut string) *command.ExecResult

func ExecResultGrepNotFound

func ExecResultGrepNotFound() *command.ExecResult

func ExecResultOKNoOutput

func ExecResultOKNoOutput() *command.ExecResult

func GetExecInfosForIPRouteInterfaceInit

func GetExecInfosForIPRouteInterfaceInit(interfaces []nt.Interface) []*cmdmock.ExecInfo

GetExecInfosForIPRouteInterfaceInit returns mock ExecInfo slice for commands executed during initialization of interfaces

func GetExecMockResultsForEnsureOnly1IPRule

func GetExecMockResultsForEnsureOnly1IPRule(rule nt.IPRule, otherRules []nt.IPRule) []*cmdmock.ExecInfo

func GetExecMockResultsForExistingIPRuleRemove

func GetExecMockResultsForExistingIPRuleRemove(rule nt.IPRule) []*cmdmock.ExecInfo

func GetMockIOOpProviderWithEmptyRTTablesFile

func GetMockIOOpProviderWithEmptyRTTablesFile(rtTablesReadResult []byte, times int,
	withAppend bool) *mocks.MockSimpleFileOperator

GetMockIOOpProviderWithEmptyRTTablesFile returns mock IOOpProvider that mocks an empty rttables file

func RandStringBytes

func RandStringBytes(n int) string

RandStringBytes returns a random string of length n

Types

This section is empty.

Jump to

Keyboard shortcuts

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