testingutils

package
v1.5.14 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 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
	HasStartError  bool
	PipedToCommand bool
}

Jump to

Keyboard shortcuts

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