testutil

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CRDExists

func CRDExists(kubeClient dynamic.Interface, name string) bool

CRDExists returns true if a schema with the given name was found

func ConcatonateList

func ConcatonateList(list []string, delimiter string) string

ConcatonateList joins lists to strings delimited with `delimiter`

func CreateAddon

func CreateAddon(kubeClient dynamic.Interface, relativePath string, nameSuffix string) (*unstructured.Unstructured, error)

CreateAddon parses the raw data from the path into an Unstructured object (Addon) and submits and returns that object

func CreateCRD

func CreateCRD(kubeClient apiextcs.Interface, relativePath string) error

CreateCRD creates the CRD parsed from the path given

func CreateLoadTestsAddon added in v0.5.0

func CreateLoadTestsAddon(lock *sync.Mutex, kubeClient dynamic.Interface, relativePath string, nameSuffix string) (*unstructured.Unstructured, error)

func DeleteAddon

func DeleteAddon(kubeClient dynamic.Interface, relativePath string) (*unstructured.Unstructured, error)

DeleteAddon deletes the Addon using the name and namespace parsed from the raw data at the given path

func DeleteCRD

func DeleteCRD(kubeClient apiextcs.Interface, relativePath string) error

DeleteCRD deletes the CRD parsed from the path given

func KubectlApply

func KubectlApply(manifestRelativePath string) error

KubectlApply runs 'kubectl apply -f <path>' with the given path

func ParseCustomResourceYaml

func ParseCustomResourceYaml(raw string) (*unstructured.Unstructured, error)

ParseCustomResourceYaml parsed the YAMl for a CRD into an Unstructured object

func PathToOSFile

func PathToOSFile(relativPath string) (*os.File, error)

PathToOSFile takes a relatice path and returns the full path on the OS

func ReadFile

func ReadFile(path string) ([]byte, error)

ReadFile reads the raw content from a file path

Types

This section is empty.

Jump to

Keyboard shortcuts

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