matchers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MatchCondition = And

MatchCondition is an alias for gomega.And to make matching conditions more readable, e.g.,

Expect(clusterRing.Status.Conditions).To(ConsistOf(
	MatchCondition(
		OfType(shardingv1alpha1.ClusterRingReady),
		WithStatus(metav1.ConditionTrue),
	),
))

Functions

func BeNotFoundError

func BeNotFoundError() gomegatypes.GomegaMatcher

BeNotFoundError checks if error is a NotFound error.

func HaveLabel

func HaveLabel(key interface{}) gomegatypes.GomegaMatcher

HaveLabel succeeds if the actual object has a label with a matching key.

func HaveLabelWithValue

func HaveLabelWithValue(key, value interface{}) gomegatypes.GomegaMatcher

HaveLabelWithValue succeeds if the actual object has a label with a matching key and value.

func OfType

func OfType(conditionType string) gomegatypes.GomegaMatcher

OfType returns a matcher for checking whether a condition has a certain type.

func WithMessage

func WithMessage(message string) gomegatypes.GomegaMatcher

WithMessage returns a matcher for checking whether a condition has a certain message.

func WithReason

func WithReason(reason string) gomegatypes.GomegaMatcher

WithReason returns a matcher for checking whether a condition has a certain reason.

func WithStatus

WithStatus returns a matcher for checking whether a condition has a certain status.

Types

This section is empty.

Jump to

Keyboard shortcuts

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