Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommandAssertion ¶
type CommandAssertion func(*testing.T, CommandResult)
func CommandErrorContains ¶
func CommandErrorContains(message string) CommandAssertion
func CommandOutputContains ¶
func CommandOutputContains(expected string) CommandAssertion
func CommandOutputEquals ¶
func CommandOutputEquals(expected string) CommandAssertion
func CommandSuccess ¶
func CommandSuccess() CommandAssertion
type CommandResult ¶
type CommandTestCase ¶
type CommandTestCase struct {
Cmd *cobra.Command
Command []string
Assertions []CommandAssertion
Stdin io.Reader
Env map[string]string
}
func (CommandTestCase) RestoreEnv ¶
func (testCase CommandTestCase) RestoreEnv(env map[string]string)
func (CommandTestCase) Run ¶
func (testCase CommandTestCase) Run(t *testing.T)
func (CommandTestCase) SetEnv ¶
func (testCase CommandTestCase) SetEnv() map[string]string
Click to show internal directories.
Click to hide internal directories.