Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Jul 26, 2021

Conversation

nija-at
Copy link
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 rix0rrr, eladb and a team July 19, 2021 10:12
@nija-at nija-at self-assigned this Jul 19, 2021
@gitpod-io
Copy link

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 eladb and a team July 21, 2021 17:11
eladb
eladb previously approved these changes Jul 26, 2021
@mergify
Copy link
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
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
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.

None yet

3 participants