exec

package
v1.1.43 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsideHelperProcess

func InsideHelperProcess(t *testing.T)

func InsideHelperProcessWithCallback

func InsideHelperProcessWithCallback(t *testing.T, callback func(t *testing.T))

Types

type RealRunner

type RealRunner struct{}

func (RealRunner) Run

func (r RealRunner) Run(cmd string, args ...string) ([]byte, error)

func (RealRunner) RunWithContext

func (r RealRunner) RunWithContext(ctx context.Context, cmd string, args ...string) ([]byte, error)

type Runner

type Runner interface {
	Run(string, ...string) ([]byte, error)
	RunWithContext(context.Context, string, ...string) ([]byte, error)
}

type TestRunner

type TestRunner struct {
	ExpectedCommand []string
	Output          []byte
	ExtraEnv        map[string]string
	ExitCode        int
	TestHelperFunc  string
}

func (TestRunner) Run

func (r TestRunner) Run(command string, args ...string) ([]byte, error)

func (TestRunner) RunWithContext

func (r TestRunner) RunWithContext(ctx context.Context, command string, args ...string) ([]byte, error)

Jump to

Keyboard shortcuts

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