kubernetes/vendor/k8s.io/utils/exec/testing/fake_exec.go

type FakeExec

var _

type FakeCommandAction

// Command returns the next unexecuted command in CommandScripts.
// This function is safe for concurrent access as long as the underlying
// FakeExec struct is not modified during execution.
func (fake *FakeExec) Command(cmd string, args ...string) exec.Cmd {}

func (fake *FakeExec) nextCommand(cmd string, args []string) exec.Cmd {}

// CommandContext wraps arguments into exec.Cmd
func (fake *FakeExec) CommandContext(ctx context.Context, cmd string, args ...string) exec.Cmd {}

// LookPath is for finding the path of a file
func (fake *FakeExec) LookPath(file string) (string, error) {}

type FakeCmd

var _

// InitFakeCmd is for creating a fake exec.Cmd
func InitFakeCmd(fake *FakeCmd, cmd string, args ...string) exec.Cmd {}

type FakeStdIOPipeResponse

type FakeAction

// SetDir sets the directory
func (fake *FakeCmd) SetDir(dir string) {}

// SetStdin sets the stdin
func (fake *FakeCmd) SetStdin(in io.Reader) {}

// SetStdout sets the stdout
func (fake *FakeCmd) SetStdout(out io.Writer) {}

// SetStderr sets the stderr
func (fake *FakeCmd) SetStderr(out io.Writer) {}

// SetEnv sets the environment variables
func (fake *FakeCmd) SetEnv(env []string) {}

// StdoutPipe returns an injected ReadCloser & error (via StdoutPipeResponse)
// to be able to inject an output stream on Stdout
func (fake *FakeCmd) StdoutPipe() (io.ReadCloser, error) {}

// StderrPipe returns an injected ReadCloser & error (via StderrPipeResponse)
// to be able to inject an output stream on Stderr
func (fake *FakeCmd) StderrPipe() (io.ReadCloser, error) {}

// Start mimicks starting the process (in the background) and returns the
// injected StartResponse
func (fake *FakeCmd) Start() error {}

// Wait mimicks waiting for the process to exit returns the
// injected WaitResponse
func (fake *FakeCmd) Wait() error {}

// Run runs the command
func (fake *FakeCmd) Run() error {}

// CombinedOutput returns the output from the command
func (fake *FakeCmd) CombinedOutput() ([]byte, error) {}

// Output is the response from the command
func (fake *FakeCmd) Output() ([]byte, error) {}

// Stop is to stop the process
func (fake *FakeCmd) Stop() {}

type FakeExitError

var _

func (fake FakeExitError) String() string {}

func (fake FakeExitError) Error() string {}

// Exited always returns true
func (fake FakeExitError) Exited() bool {}

// ExitStatus returns the fake status
func (fake FakeExitError) ExitStatus() int {}