expectations

package
v0.0.0-...-d7985ca Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReconcilerPropagationTime = 10 * time.Second
	RequestInterval           = 1 * time.Second
)

Variables

This section is empty.

Functions

func ExpectApplied

func ExpectApplied(ctx context.Context, c client.Client, objects ...client.Object)

func ExpectAppliedWithOffset

func ExpectAppliedWithOffset(offset int, ctx context.Context, c client.Client, objects ...client.Object)

func ExpectCleanedUp

func ExpectCleanedUp(ctx context.Context, c client.Client)

func ExpectDeleted

func ExpectDeleted(ctx context.Context, c client.Client, objects ...client.Object)

func ExpectDeletionTimestampSet

func ExpectDeletionTimestampSet(ctx context.Context, c client.Client, objects ...client.Object)

func ExpectDeletionTimestampSetWithOffset

func ExpectDeletionTimestampSetWithOffset(offset int, ctx context.Context, c client.Client, objects ...client.Object)

ExpectDeletionTimestampSetWithOffset ensures that the deletion timestamp is set on the objects by adding a finalizer and then deleting the object immediately after. This holds the object until the finalizer is patched out in the DeferCleanup

func ExpectExists

func ExpectExists[T client.Object](ctx context.Context, c client.Client, obj T) T

func ExpectExistsWithOffset

func ExpectExistsWithOffset[T client.Object](offset int, ctx context.Context, c client.Client, obj T) T

func ExpectFinalizersRemoved

func ExpectFinalizersRemoved(ctx context.Context, c client.Client, objs ...client.Object)

func ExpectFinalizersRemovedFromList

func ExpectFinalizersRemovedFromList(ctx context.Context, c client.Client, objectLists ...client.ObjectList)

func ExpectManualBinding

func ExpectManualBinding(ctx context.Context, c client.Client, pod *v1.Pod, node *v1.Node)

func ExpectManualBindingWithOffset

func ExpectManualBindingWithOffset(offset int, ctx context.Context, c client.Client, pod *v1.Pod, node *v1.Node)

func ExpectNodeExists

func ExpectNodeExists(ctx context.Context, c client.Client, name string) *v1.Node

func ExpectNodeExistsWithOffset

func ExpectNodeExistsWithOffset(offset int, ctx context.Context, c client.Client, name string) *v1.Node

func ExpectNotFound

func ExpectNotFound(ctx context.Context, c client.Client, objects ...client.Object)

func ExpectNotFoundWithOffset

func ExpectNotFoundWithOffset(offset int, ctx context.Context, c client.Client, objects ...client.Object)

func ExpectNotScheduled

func ExpectNotScheduled(ctx context.Context, c client.Client, pod *v1.Pod) *v1.Pod

func ExpectOwnerReferenceExists

func ExpectOwnerReferenceExists(obj, owner client.Object) metav1.OwnerReference

func ExpectPodExists

func ExpectPodExists(ctx context.Context, c client.Client, name string, namespace string) *v1.Pod

func ExpectPodExistsWithOffset

func ExpectPodExistsWithOffset(offset int, ctx context.Context, c client.Client, name string, namespace string) *v1.Pod

func ExpectProvisioned

func ExpectProvisioned(ctx context.Context, c client.Client, cluster *state.Cluster, provisioner *provisioning.Provisioner, pods ...*v1.Pod) map[*v1.Pod]*v1.Node

func ExpectProvisionedNoBinding

func ExpectProvisionedNoBinding(ctx context.Context, c client.Client, provisioner *provisioning.Provisioner, pods ...*v1.Pod) map[*v1.Pod]*v1.Node

func ExpectProvisionedNoBindingWithOffset

func ExpectProvisionedNoBindingWithOffset(offset int, ctx context.Context, c client.Client, provisioner *provisioning.Provisioner, pods ...*v1.Pod) map[*v1.Pod]*v1.Node

func ExpectReconcileFailed

func ExpectReconcileFailed(ctx context.Context, reconciler reconcile.Reconciler, key client.ObjectKey)

func ExpectReconcileSucceeded

func ExpectReconcileSucceeded(ctx context.Context, reconciler reconcile.Reconciler, key client.ObjectKey) reconcile.Result

func ExpectResources

func ExpectResources(expected, real v1.ResourceList)

ExpectResources expects all the resources in expected to exist in real with the same values

func ExpectScheduled

func ExpectScheduled(ctx context.Context, c client.Client, pod *v1.Pod) *v1.Node

func ExpectSkew

func ExpectSkew(ctx context.Context, c client.Client, namespace string, constraint *v1.TopologySpreadConstraint) Assertion

func ExpectStatusConditionExists

func ExpectStatusConditionExists(obj apis.ConditionsAccessor, t apis.ConditionType) apis.Condition

func FindMetricWithLabelValues

func FindMetricWithLabelValues(name string, labelValues map[string]string) (*prometheus.Metric, bool)

FindMetricWithLabelValues attempts to find a metric with a name with a set of label values If no metric is found, the *prometheus.Metric will be nil

func GomegaFromContext

func GomegaFromContext(ctx context.Context) Gomega

func GomegaWithContext

func GomegaWithContext(ctx context.Context, g Gomega) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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