Documentation ¶
Index ¶
- func BeAlreadyExistsError() types.GomegaMatcher
- func BeBadRequestError() types.GomegaMatcher
- func BeForbiddenError() types.GomegaMatcher
- func BeInternalServerError() types.GomegaMatcher
- func BeInvalidError() types.GomegaMatcher
- func BeMissingKindError() types.GomegaMatcher
- func BeNoMatchError() types.GomegaMatcher
- func BeNotFoundError() types.GomegaMatcher
- func BeNotRegisteredError() types.GomegaMatcher
- func ConsistOfFields(fields ...gstruct.Fields) types.GomegaMatcher
- func ContainCondition(matchers ...gomegatypes.GomegaMatcher) gomegatypes.GomegaMatcher
- func DeepDerivativeEqual(expected any) types.GomegaMatcher
- func DeepEqual(expected any) types.GomegaMatcher
- func HaveFields(fields gstruct.Fields) types.GomegaMatcher
- func NewManagedResourceConsistOfObjectsMatcher(c client.Client) func(...client.Object) types.GomegaMatcher
- func NewManagedResourceContainsObjectsMatcher(c client.Client) func(...client.Object) types.GomegaMatcher
- func OfType(conditionType gardencorev1beta1.ConditionType) gomegatypes.GomegaMatcher
- func ShareSameReferenceAs(expected any) types.GomegaMatcher
- func WithCodes(codes ...gardencorev1beta1.ErrorCode) gomegatypes.GomegaMatcher
- func WithMessage(message string) gomegatypes.GomegaMatcher
- func WithMessageSubstrings(messages ...string) gomegatypes.GomegaMatcher
- func WithReason(reason string) gomegatypes.GomegaMatcher
- func WithStatus(status gardencorev1beta1.ConditionStatus) gomegatypes.GomegaMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeAlreadyExistsError ¶
func BeAlreadyExistsError() types.GomegaMatcher
BeAlreadyExistsError checks if error is AlreadyExists.
func BeBadRequestError ¶
func BeBadRequestError() types.GomegaMatcher
BeBadRequestError checks if error is BadRequest.
func BeForbiddenError ¶
func BeForbiddenError() types.GomegaMatcher
BeForbiddenError checks if error is Forbidden.
func BeInternalServerError ¶
func BeInternalServerError() types.GomegaMatcher
BeInternalServerError checks if error is a InternalServerError.
func BeInvalidError ¶
func BeInvalidError() types.GomegaMatcher
BeInvalidError checks if error is an InvalidError.
func BeMissingKindError ¶
func BeMissingKindError() types.GomegaMatcher
BeMissingKindError checks if error is a MissingKindError.
func BeNoMatchError ¶
func BeNoMatchError() types.GomegaMatcher
BeNoMatchError checks if error is a NoMatchError.
func BeNotFoundError ¶
func BeNotFoundError() types.GomegaMatcher
BeNotFoundError checks if error is NotFound.
func BeNotRegisteredError ¶
func BeNotRegisteredError() types.GomegaMatcher
BeNotRegisteredError checks if error is NotRegistered.
func ConsistOfFields ¶
func ConsistOfFields(fields ...gstruct.Fields) types.GomegaMatcher
ConsistOfFields succeeds if actual matches all selected fields. Actual must be an array, slice or map. For maps, ConsistOfFields matches against the map's values. Actual's elements must be pointers.
func ContainCondition ¶
func ContainCondition(matchers ...gomegatypes.GomegaMatcher) gomegatypes.GomegaMatcher
ContainCondition returns a matchers for checking whether a condition is contained.
func DeepDerivativeEqual ¶
func DeepDerivativeEqual(expected any) types.GomegaMatcher
DeepDerivativeEqual is similar to DeepEqual except that unset fields in actual are ignored (not compared). This allows us to focus on the fields that matter to the semantic comparison.
func DeepEqual ¶
func DeepEqual(expected any) types.GomegaMatcher
DeepEqual returns a Gomega matcher which checks whether the expected object is deeply equal with the object it is being compared against.
func HaveFields ¶
func HaveFields(fields gstruct.Fields) types.GomegaMatcher
HaveFields succeeds if actual is a pointer and has a specific fields. Ignores extra elements or fields.
func NewManagedResourceConsistOfObjectsMatcher ¶
func NewManagedResourceConsistOfObjectsMatcher(c client.Client) func(...client.Object) types.GomegaMatcher
NewManagedResourceConsistOfObjectsMatcher returns a function for a matcher that checks if the exact list of given objects are handled by the given managed resource. Any extra objects found through the ManagedResource let the matcher fail. It is expected that the data keys of referenced secret(s) follow the semantics of `managedresources.Registry`.
func NewManagedResourceContainsObjectsMatcher ¶
func NewManagedResourceContainsObjectsMatcher(c client.Client) func(...client.Object) types.GomegaMatcher
NewManagedResourceContainsObjectsMatcher returns a function for a matcher that checks if the given objects are handled by the given managed resource. It is expected that the data keys of referenced secret(s) follow the semantics of `managedresources.Registry`.
func OfType ¶
func OfType(conditionType gardencorev1beta1.ConditionType) gomegatypes.GomegaMatcher
OfType returns a matcher for checking whether a condition has a certain type.
func ShareSameReferenceAs ¶
func ShareSameReferenceAs(expected any) types.GomegaMatcher
ShareSameReferenceAs checks if objects shares the same underlying reference as the passed object. This can be used to check if maps or slices have the same underlying data store. Only objects that work for 'reflect.ValueOf(x).Pointer' can be compared.
func WithCodes ¶
func WithCodes(codes ...gardencorev1beta1.ErrorCode) gomegatypes.GomegaMatcher
WithCodes returns a matcher for checking whether a condition contains certain error codes.
func WithMessage ¶
func WithMessage(message string) gomegatypes.GomegaMatcher
WithMessage returns a matcher for checking whether a condition has a certain message.
func WithMessageSubstrings ¶
func WithMessageSubstrings(messages ...string) gomegatypes.GomegaMatcher
WithMessageSubstrings returns a matcher for checking whether a condition's message contains certain substrings.
func WithReason ¶
func WithReason(reason string) gomegatypes.GomegaMatcher
WithReason returns a matcher for checking whether a condition has a certain reason.
func WithStatus ¶
func WithStatus(status gardencorev1beta1.ConditionStatus) gomegatypes.GomegaMatcher
WithStatus returns a matcher for checking whether a condition has a certain status.
Types ¶
This section is empty.