testingutils

package
v1.4.15 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFakeExecWithScripts

func GetFakeExecWithScripts(calls []TestCmd) *fakeexec.FakeExec

func RequireRootforTest

func RequireRootforTest(t *testing.T)

func RequireRootforTestMain

func RequireRootforTestMain()

func VerifyCalls

func VerifyCalls(t *testing.T, fexec *fakeexec.FakeExec, calls []TestCmd)

Types

type TestCmd

type TestCmd struct {
	Cmd      []string
	Stdout   string // fakexec doesn't leverage stderr in CombinedOutput, so use stdout for stderr too
	ExitCode int
}

Jump to

Keyboard shortcuts

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