Documentation ¶
Overview ¶
package utils contain miscellaneous utility functions that can be useful when writing tests or working with this test framework.
Index ¶
Constants ¶
const ( // DeleteAnnotation is added to Organizations created during testing. // This is to ensure only those with this annotation can be deleted to avoid accidentally deleting a shared Org. DeleteAnnotation = "e2e-test-cleanup" )
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomName ¶
GenerateRandomName produces a random name made up of lower case letters and number, prefixed with the given string and seprated with a hyphen. The generated name is limited to 20 characters.
func GetBaseLabels ¶ added in v1.21.0
GetBaseLabels returns a map of labels based on specific available environment variables being found
func GetGitHubToken ¶ added in v0.1.1
func GetGitHubToken() string
GetGitHubToken returns a GitHub token (if found) from either: - The `GITHUB_TOKEN` env var value - The contents of the file defined by the `GITHUB_TOKEN_FILE` env var
func SafeToDelete ¶ added in v1.0.0
SafeToDelete checks if the provided annotations contains an annotation specific to E2E testing
func ShouldSkipUpgrade ¶ added in v1.13.0
func ShouldSkipUpgrade() bool
ShouldSkipUpgrade checks for the required environment variables needed to run the upgrade test suite
func StringToPointer ¶
StringToPointer returns a pointer to the provided string
Types ¶
This section is empty.