Documentation ¶
Index ¶
- func CaptureStdOut(t *testing.T) (*os.File, *os.File, *os.File)
- func CreateExitHandlerFunc(t *testing.T, stdOutWriter *os.File, stdOutReader *os.File, ...) func(int) int
- 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, origStdout *os.File)
- func UnsetValues(testOption TestOption)
- type TestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureStdOut ¶
CaptureStdOut creates a pipe to capture standard output and returns the original handle to stdout as well as a file handles for the created pipe.
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 ¶
Click to show internal directories.
Click to hide internal directories.