Documentation
¶
Index ¶
- func AssertError(t *testing.T, err error, expectedMsg string)
- func AssertNoError(t *testing.T, err error)
- func CaptureStdout(t *testing.T) (string, func())
- func ClearEnv(t interface{ ... }, keys []string) func()
- func GetEnvMapFromStrings(envStrings []string) map[string]string
- func SetEnv(t interface{ ... }, env map[string]string) func()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertError ¶
AssertError asserts that an error is not nil and contains the expected message.
func AssertNoError ¶
AssertNoError asserts that an error is nil.
func CaptureStdout ¶
CaptureStdout captures the output of stdout during a test. It returns the captured string and a function to restore stdout.
func ClearEnv ¶
ClearEnv clears a list of environment variables. It returns a cleanup function that restores the original environment variables.
func GetEnvMapFromStrings ¶
GetEnvMapFromStrings converts a slice of "KEY=VALUE" strings into a map.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.