-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Describe the feature
I am requesting creation of a Template.resourcePropertiesCountIs()
method to compliment Template.resourceCountIs()
in the same way that Template.hasResourceProperties()
complements Template.hasResource()
.
This is a function that asserts that the number of resources in the Template of a given type and that match specified resource properties is equal to a given count.
Use Case
I recently migrated the AWS RFDK from CDKv1 to CDKv2. Many of our tests involve counting the number of Resources with a specific set of properties, but the new testing module for the CDK does not cover the use-case.
I ended up creating a helper in the RFDK to help with our migration, but I think that the functionality would be more useful to the general community.
Proposed Solution
I have a PR prepped and will be posting it momentarily.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.38.1
Environment details (OS name and version, etc.)
All