utils

package
v1.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 7

Documentation

Overview

package utils contain miscellaneous utility functions that can be useful when writing tests or working with this test framework.

Index

Constants

View Source
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

func GenerateRandomName(prefix string) string

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 GetGitHubToken added in v0.1.1

func GetGitHubToken() string

func SafeToDelete added in v1.0.0

func SafeToDelete(annotations map[string]string) bool

SafeToDelete checks if the provided annotations contains an annotation specific to E2E testing

func StringToPointer

func StringToPointer(str string) *string

StringToPointer returns a pointer to the provided string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL