Documentation
¶
Index ¶
- func CleanString(s string) string
- func GetK8sClientConfig() (*rest.Config, error)
- func GetK8sClientConfigWithContext(kubeContext string) (*rest.Config, error)
- func GetTestEnvOptionalVar(t testing.TB, modulePkg, key string) string
- func GetTestEnvRequiredVar(t testing.TB, modulePkg, key string) string
- func RandomPassword(length int) string
- func RequirePrng()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanString ¶
CleanString cleans up a string by removing leading and trailing newlines, and helps with using backticks in multi-line strings by replacing triple single quotes with backticks.
func GetK8sClientConfig ¶
GetK8sClientConfig creates a Kubernetes client config using the default loading rules.
func GetK8sClientConfigWithContext ¶
GetK8sClientConfigWithContext creates a Kubernetes client config using the specified context.
func GetTestEnvOptionalVar ¶
GetTestEnvOptionalVar retrieves an optional environment variable for tests.
func GetTestEnvRequiredVar ¶
GetTestEnvRequiredVar retrieves a required environment variable for tests. If the variable is not set, the test is skipped.
func RandomPassword ¶
RandomPassword generates a random password of the given length.
func RequirePrng ¶ added in v0.2.0
func RequirePrng()
RequirePrng ensures that the system has a secure PRNG available for the crypto/rand package.
Types ¶
This section is empty.