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(assert): add countResourcesLike method #6168

Merged
merged 5 commits into from
Feb 10, 2020

Conversation

substantial-kst
Copy link
Contributor

@substantial-kst substantial-kst commented Feb 7, 2020

Adds a method to assert against an expected count of Stack resources filtered by Type (i.e. "AWS::ApiGateway::Method") as well as properties (i.e. { resourceId: "MyResource01234" }) - similar to existing haveResource vs. haveResourceLike methods.

Addresses feature request #6132

🗒 Filtering by properties uses quick-and-dirty JSON.stringify comparison of each key of provided props object & a resource's Properties object, so the expected caveats regarding nested object inequality (differently-ordered properties, incomplete properties) apply here (and have corresponding tests).


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

substantial-kst and others added 2 commits February 7, 2020 09:15
Adds a method to get a count of Stack resources filtered by Type (i.e. `"AWS::ApiGateway::Method"`) as well as properties (i.e. `{ resourceId: "MyResource01234" }`)
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@substantial-kst substantial-kst requested a review from eladb February 7, 2020 18:13
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

eladb
eladb previously requested changes Feb 9, 2020
Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Can you please update README?

Adds documentation for `countResources` and `countResourcesLike` methods
@mergify mergify bot dismissed eladb’s stale review February 9, 2020 22:23

Pull request has been modified.

@ghost
Copy link

ghost commented Feb 9, 2020

Looks good. Can you please update README?

@eladb Added documentation for countResources & countResourcesLike

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

eladb
eladb previously approved these changes Feb 10, 2020
@mergify mergify bot dismissed eladb’s stale review February 10, 2020 07:01

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify
Copy link
Contributor

mergify bot commented Feb 10, 2020

Thank you for contributing! Your pull request is now being automatically merged.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify
Copy link
Contributor

mergify bot commented Feb 10, 2020

Thank you for contributing! Your pull request is now being automatically merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants