expectations

package
v0.100.101-test Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 26 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 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, objects ...client.Object)

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 ExpectMetric

func ExpectMetric(prefix string) *prometheus.MetricFamily

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 ExpectPanic

func ExpectPanic()

ExpectPanic is a function that should be deferred at the beginning of a test like "defer ExpectPanic()" It asserts that the test should panic

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, recorder *test.EventRecorder, controller corecontroller.Controller,
	provisioner *provisioning.Provisioner, pods ...*v1.Pod) (result []*v1.Pod)

func ExpectProvisionedNoBinding

func ExpectProvisionedNoBinding(ctx context.Context, c client.Client, controller corecontroller.Controller, provisioner *provisioning.Provisioner, pods ...*v1.Pod) (result []*v1.Pod)

func ExpectProvisionedNoBindingWithOffset

func ExpectProvisionedNoBindingWithOffset(offset int, ctx context.Context, c client.Client, controller corecontroller.Controller, provisioner *provisioning.Provisioner, pods ...*v1.Pod) (result []*v1.Pod)

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 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 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