test

package
v0.0.0-...-2605c6a Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: EPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareResources

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

func EnableTestMode

func EnableTestMode()

func EnsureReconcile

func EnsureReconcile(
	t *testing.T,
	ctx *chetypes.DeployContext,
	testReconcileFunc func(ctx *chetypes.DeployContext) (result reconcile.Result, done bool, err error))

EnsureReconcile runs the testReconcileFunc until it returns done=true or 10 iterations

func FindVolume

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

func FindVolumeMount

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

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 DeployContextBuild

type DeployContextBuild struct {
	// contains filtered or unexported fields
}

func NewCtxBuilder

func NewCtxBuilder() *DeployContextBuild

func (*DeployContextBuild) Build

func (*DeployContextBuild) WithCheCluster

func (f *DeployContextBuild) WithCheCluster(cheCluster *chev2.CheCluster) *DeployContextBuild

func (*DeployContextBuild) WithObjects

func (f *DeployContextBuild) WithObjects(initObjs ...client.Object) *DeployContextBuild

type TestExpectedResources

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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