test

package
v0.0.0-...-be4e7bc Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: EPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqualEnvVars

func AssertEqualEnvVars(t *testing.T, expected []corev1.EnvVar, actual []corev1.EnvVar)

func CompareResources

func CompareResources(actualDeployment *appsv1.Deployment, expected TestExpectedResources, t *testing.T)

func EnableTestMode

func EnableTestMode()

func FindVolume

func FindVolume(volumes []corev1.Volume, name string) corev1.Volume

func FindVolumeMount

func FindVolumeMount(volumes []corev1.VolumeMount, name string) corev1.VolumeMount

func GetDeployContext

func GetDeployContext(cheCluster *chev2.CheCluster, initObjs []runtime.Object) *chetypes.DeployContext

Initialize DeployContext for tests

func GetResourceQuantity

func GetResourceQuantity(value string, defaultValue string) resource.Quantity

func IsObjectExists

func IsObjectExists(client client.Client, key types.NamespacedName, blueprint client.Object) bool

func IsTestMode

func IsTestMode() bool

func ValidateContainData

func ValidateContainData(actualData map[string]string, expectedData map[string]string, t *testing.T)

func ValidateSecurityContext

func ValidateSecurityContext(actualDeployment *appsv1.Deployment, t *testing.T)

Types

type TestExpectedResources

type TestExpectedResources struct {
	MemoryLimit   string
	MemoryRequest string
	CpuRequest    string
	CpuLimit      string
}

Jump to

Keyboard shortcuts

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