Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Match_AbsentProperty ¶
func Match_AbsentProperty() *string
Use this matcher in the place of a field's value, if the field must not be present. Experimental.
func Matcher_IsMatcher ¶
func Matcher_IsMatcher(x interface{}) *bool
Check whether the provided object is a subtype of the `IMatcher`. Experimental.
func NewMatchResult_Override ¶
func NewMatchResult_Override(m MatchResult, target interface{})
Experimental.
Types ¶
type Match ¶
type Match interface { }
Partial and special matching during template assertions. Experimental.
type MatchResult ¶
type MatchResult interface { FailCount() *float64 Target() interface{} Compose(id *string, inner MatchResult) MatchResult HasFailed() *bool Push(matcher Matcher, path *[]*string, message *string) MatchResult ToHumanStrings() *[]*string }
The result of `Match.test()`. Experimental.
type Matcher ¶
type Matcher interface { Name() *string Test(actual interface{}) MatchResult }
Represents a matcher that can perform special data matching capabilities between a given pattern and a target. Experimental.
func Match_ArrayEquals ¶
func Match_ArrayEquals(pattern *[]interface{}) Matcher
Matches the specified pattern with the array found in the same relative path of the target.
The set of elements (or matchers) must match exactly and in order. Experimental.
func Match_ArrayWith ¶
func Match_ArrayWith(pattern *[]interface{}) Matcher
Matches the specified pattern with the array found in the same relative path of the target.
The set of elements (or matchers) must be in the same order as would be found. Experimental.
func Match_Exact ¶
func Match_Exact(pattern interface{}) Matcher
Deep exact matching of the specified pattern to the target. Experimental.
func Match_ObjectEquals ¶
Matches the specified pattern to an object found in the same relative path of the target.
The keys and their values (or matchers) must match exactly with the target. Experimental.
func Match_ObjectLike ¶
Matches the specified pattern to an object found in the same relative path of the target.
The keys and their values (or matchers) must be present in the target but the target can be a superset. Experimental.
type Template ¶
type Template interface { FindMappings(props interface{}) *[]*map[string]interface{} FindOutputs(props interface{}) *[]*map[string]interface{} FindResources(type_ *string, props interface{}) *[]*map[string]interface{} HasMapping(props interface{}) HasOutput(props interface{}) HasResource(type_ *string, props interface{}) HasResourceProperties(type_ *string, props interface{}) ResourceCountIs(type_ *string, count *float64) TemplateMatches(expected *map[string]interface{}) ToJSON() *map[string]interface{} }
Suite of assertions that can be run on a CDK stack.
Typically used, as part of unit tests, to validate that the rendered CloudFormation template has expected resources and properties. Experimental.
func Template_FromJSON ¶
Base your assertions from an existing CloudFormation template formatted as an in-memory JSON object. Experimental.
func Template_FromStack ¶
Base your assertions on the CloudFormation template synthesized by a CDK `Stack`. Experimental.
func Template_FromString ¶
Base your assertions from an existing CloudFormation template formatted as a JSON string. Experimental.