utils

package
v0.0.0-...-cd07ea3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package utils provides a few common utilities used during our end to end tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindUnstructuredByOwner

func FindUnstructuredByOwner(
	ctx context.Context,
	cl client.Client,
	namespace string,
	parentUID types.UID,
	list *unstructured.UnstructuredList,
) (*unstructured.Unstructured, error)

FindUnstructuredByOwner returns a list of Unstructured Objects based on the OwnerReference supplied. Used to dynamically search for resource types that we expect the to have been created by our Builders, making sure that they

NOTE: Unused right now. TODO, Maybe remove.

func GetNonEmptyLines

func GetNonEmptyLines(output string) []string

GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.

func GetProjectDir

func GetProjectDir() (string, error)

GetProjectDir will return the directory where the project is

func LoadImageToKindClusterWithName

func LoadImageToKindClusterWithName(name string) error

LoadImageToKindClusterWithName loads a local docker image to the kind cluster

func RandomString

func RandomString(length int) string

RandomString is a function for generating a random string for certain tests

func Run

func Run(cmd *exec.Cmd) (string, error)

Run executes the provided command within this context

Types

This section is empty.

Jump to

Keyboard shortcuts

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