Skip to content

feat(assertions): retrieve matching resources from the template#15642

Merged
mergify[bot] merged 4 commits intomasterfrom
nija-at/assertions-cloudwatch
Jul 26, 2021
Merged

feat(assertions): retrieve matching resources from the template#15642
mergify[bot] merged 4 commits intomasterfrom
nija-at/assertions-cloudwatch

Conversation

@nija-at
Copy link
Copy Markdown
Contributor

@nija-at nija-at commented Jul 19, 2021

Provide API findResources() that retrieves the matching resources
from the template given its type and optional predicate.

For complex assertions that cannot be modeled using the primitives
provided by this module, this API allows an 'escape hatch' so that
assertions can be written directly into the test case.

This is being used in the aws-cloudwatch module, specifically to
assert widgets in a CloudWatch Dashboard that are modeled as serialized
JSON within a property in the resource.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Provide an API `getResources()` that retrieves the matching resources
from the template given its type and optional predicate.

For complex assertions that cannot be modeled using the primitives
provided by this module, this API allows an 'escape hatch' so that
assertions can be written directly into the test case.

This is being used in the `aws-cloudwatch` module, specifically to
assert widgets in a CloudWatch Dashboard that are modeled as serialized
JSON within a property in the resource.
@nija-at nija-at requested review from a team, eladb and rix0rrr July 19, 2021 10:12
@nija-at nija-at self-assigned this Jul 19, 2021
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Jul 19, 2021

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 19, 2021
@nija-at nija-at requested review from a team and eladb July 21, 2021 17:11
eladb
eladb previously approved these changes Jul 26, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 26, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: afafa9a
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit a8b1c47 into master Jul 26, 2021
@mergify mergify bot deleted the nija-at/assertions-cloudwatch branch July 26, 2021 11:13
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 26, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Aug 3, 2021
…15642)

Provide API `findResources()` that retrieves the matching resources
from the template given its type and optional predicate.

For complex assertions that cannot be modeled using the primitives
provided by this module, this API allows an 'escape hatch' so that
assertions can be written directly into the test case.

This is being used in the `aws-cloudwatch` module, specifically to
assert widgets in a CloudWatch Dashboard that are modeled as serialized
JSON within a property in the resource.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
…15642)

Provide API `findResources()` that retrieves the matching resources
from the template given its type and optional predicate.

For complex assertions that cannot be modeled using the primitives
provided by this module, this API allows an 'escape hatch' so that
assertions can be written directly into the test case.

This is being used in the `aws-cloudwatch` module, specifically to
assert widgets in a CloudWatch Dashboard that are modeled as serialized
JSON within a property in the resource.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants