Documentation
¶
Index ¶
- func CreateExitHandlerFunc(t *testing.T, tee *Tee, expectedExitCode int, expectedErrorMessage string) func(int) bool
- func HideEnv(t *testing.T) func(t *testing.T)
- func InitTestConfig(config string) error
- func RunCommand(f func(*cobra.Command, []string))
- func SetOptionValue(t *testing.T, testOption TestOption)
- func SetupTmpMinishiftHome(t *testing.T) string
- func TearDown(testDir string, tee *Tee)
- func UnsetValues(testOption TestOption)
- type Tee
- type TestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateExitHandlerFunc ¶
func HideEnv ¶
Temporarily unsets the env variables for the test cases returns a function to reset them to their initial values
func InitTestConfig ¶
func RunCommand ¶
func SetOptionValue ¶
func SetOptionValue(t *testing.T, testOption TestOption)
func SetupTmpMinishiftHome ¶
SetupTmpMinishiftHome creates a tmp directory and points MINISHIFT_HOME to it. It returns the path to this tmp directory
func UnsetValues ¶
func UnsetValues(testOption TestOption)
Types ¶
type Tee ¶
type Tee struct { OrigStdout *os.File OrigStderr *os.File Stdout *os.File Stderr *os.File StdoutBuffer *bytes.Buffer StderrBuffer *bytes.Buffer // contains filtered or unexported fields }
func CreateTee ¶
CreateTee splits the stdout and stderr in order to capture these streams into a buffer during test execution. If silent is true, the original output streams are silenced.
Click to show internal directories.
Click to hide internal directories.