Documentation
¶
Index ¶
- func ExecuteCmd(cmd *root.CmdRoot, cmdArgs interface{}, opts ...ExecuteOptions) error
- func ExecuteCmdWithOutputs(cmd *root.CmdRoot, cmdArgs interface{}, opts ...ExecuteOptions) (stdout string, stderr string, err error)
- func ExecuteCmdWithStandardOutput(cmd *root.CmdRoot, cmdArgs interface{}, opts ...ExecuteOptions) (stdout string, err error)
- func NewMockCommand() *root.CmdRoot
- func ParseShellEnv(in string) map[string]string
- type ExecuteOptions
- func WithCaptureStdErr(w io.Writer) ExecuteOptions
- func WithCaptureStdOut(w io.Writer) ExecuteOptions
- func WithEmptyEnv(t *testing.T) ExecuteOptions
- func WithEnv(t *testing.T, env map[string]string) ExecuteOptions
- func WithOSStdIn(t *testing.T, v string) ExecuteOptions
- func WithSensitiveLogging(t *testing.T, v bool) ExecuteOptions
- func WithSessionEncryption(t *testing.T, v bool) ExecuteOptions
- func WithSetting(t *testing.T, key string, value any) ExecuteOptions
- func WithStdIn(v string) ExecuteOptions
- func WithStderrTTY(v bool) ExecuteOptions
- func WithStdinTTY(v bool) ExecuteOptions
- func WithStdoutTTY(v bool) ExecuteOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteCmd ¶
func ExecuteCmd(cmd *root.CmdRoot, cmdArgs interface{}, opts ...ExecuteOptions) error
func ExecuteCmdWithOutputs ¶
func ExecuteCmdWithStandardOutput ¶
func ExecuteCmdWithStandardOutput(cmd *root.CmdRoot, cmdArgs interface{}, opts ...ExecuteOptions) (stdout string, err error)
func NewMockCommand ¶
func ParseShellEnv ¶
Types ¶
type ExecuteOptions ¶
func WithCaptureStdErr ¶
func WithCaptureStdErr(w io.Writer) ExecuteOptions
func WithCaptureStdOut ¶
func WithCaptureStdOut(w io.Writer) ExecuteOptions
func WithEmptyEnv ¶
func WithEmptyEnv(t *testing.T) ExecuteOptions
func WithOSStdIn ¶
func WithOSStdIn(t *testing.T, v string) ExecuteOptions
func WithSensitiveLogging ¶ added in v2.53.0
func WithSensitiveLogging(t *testing.T, v bool) ExecuteOptions
WithSensitiveLogging controls the hiding of sensitive information in the logs and dry run output
func WithSessionEncryption ¶ added in v2.53.0
func WithSessionEncryption(t *testing.T, v bool) ExecuteOptions
WithSessionEncryption sets whether session data should be encrypted or not
func WithSetting ¶ added in v2.53.0
func WithSetting(t *testing.T, key string, value any) ExecuteOptions
WithSetting sets a configuration setting of a given key, and translates it to the equivalent environment variable The env variable value is restored at the end of the test
func WithStdIn ¶
func WithStdIn(v string) ExecuteOptions
func WithStderrTTY ¶
func WithStderrTTY(v bool) ExecuteOptions
func WithStdinTTY ¶
func WithStdinTTY(v bool) ExecuteOptions
func WithStdoutTTY ¶
func WithStdoutTTY(v bool) ExecuteOptions
Click to show internal directories.
Click to hide internal directories.