Documentation ¶
Index ¶
- func AppendRandomString(prefix string) string
- func ChdirToRoot() error
- func CombineErrors(errs []error) error
- func CreateDir(dirPath string) error
- func CreateDirWithFileMode(dirPath string, perm os.FileMode) error
- func GetBaseFuncName(fullFuncName string) string
- func GetRootDir() (string, error)
- func MakeK8sNamePrefix(s string) string
- func MustGetRootDir() string
- func RandomString() string
- func Run(message string, call func() error, dryrun bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendRandomString ¶
AppendRandomString will generate a random string that begins with prefix. This is useful if you want to make sure that your tests can run at the same time against the same environment without conflicting. This method will use "-" as the separator between the prefix and the random suffix.
func CombineErrors ¶
CombineErrors combines slice of errors and return a single error
func CreateDir ¶
CreateDir creates dir if does not exist. The created dir will have the permission bits as 0777, which means everyone can read/write/execute it.
func CreateDirWithFileMode ¶
CreateDirWithFileMode creates dir if does not exist. The created dir will have the permission bits as perm, which is the standard Unix rwxrwxrwx permissions.
func GetBaseFuncName ¶
GetBaseFuncName returns the baseFuncName parsed from the fullFuncName. eg. test/e2e.TestMain will return TestMain.
func MakeK8sNamePrefix ¶
MakeK8sNamePrefix converts each chunk of non-alphanumeric character into a single dash and also convert camelcase tokens into dash-delimited lowercase tokens.
func MustGetRootDir ¶
func MustGetRootDir() string
MustGetRootDir gets directory of git root. Fatal if it fails.
Types ¶
This section is empty.