Documentation ¶
Overview ¶
Package utils provides a few common utilities used during our end to end tests
Index ¶
- func FindUnstructuredByOwner(ctx context.Context, cl client.Client, namespace string, parentUID types.UID, ...) (*unstructured.Unstructured, error)
- func GetNonEmptyLines(output string) []string
- func GetProjectDir() (string, error)
- func LoadImageToKindClusterWithName(name string) error
- func RandomString(length int) string
- func Run(cmd *exec.Cmd) (string, error)
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 ¶
GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.
func GetProjectDir ¶
GetProjectDir will return the directory where the project is
func LoadImageToKindClusterWithName ¶
LoadImageToKindClusterWithName loads a local docker image to the kind cluster
func RandomString ¶
RandomString is a function for generating a random string for certain tests
Types ¶
This section is empty.