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: ? modules, 0 packages

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

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