gomega

package
v4.0.0-...-c771b01 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alias

func Alias(opts ...any) gomegatypes.GomegaMatcher

Alias matches an Alias by name, type, and/or parent. The following option types are supported: - resource.URN - matches the parent URN - tokens.Type - matches the type - tokens.QName - matches the name - string - matches the name

func BeComputed

func BeComputed() gomegatypes.GomegaMatcher

func MatchObject

func MatchObject(options Options, props Props) gomegatypes.GomegaMatcher

func MatchProps

func MatchProps(options Options, props Props) gomegatypes.GomegaMatcher

MatchProps succeeds if the actual value is a resource.PropertyMap and all of the expected properties match. Options can be used to ignore extra properties or missing properties.

func MatchResourceReferenceValue

func MatchResourceReferenceValue(urn resource.URN, id string) gomegatypes.GomegaMatcher

MatchResourceReferenceValue succeeds if the actual value is a resource.PropertyValue of type ResourceReference and the URN and ID match the expected values.

func MatchValue

func MatchValue(v any) gomegatypes.GomegaMatcher

func ProtobufStruct

func ProtobufStruct(matcher gomegatypes.GomegaMatcher) gomegatypes.GomegaMatcher

ProtobufStruct matches a protobuf struct by decoding it to a map and then applying the given matcher.

Types

type AliasMatcher

type AliasMatcher struct {
	Name      *tokens.QName
	Type      *tokens.Type
	ParentURN *resource.URN
	NoParent  *bool
}

func (*AliasMatcher) FailureMessage

func (matcher *AliasMatcher) FailureMessage(actual interface{}) (message string)

func (*AliasMatcher) Match

func (matcher *AliasMatcher) Match(actual interface{}) (success bool, err error)

func (*AliasMatcher) NegatedFailureMessage

func (matcher *AliasMatcher) NegatedFailureMessage(actual interface{}) (message string)

Jump to

Keyboard shortcuts

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