Test existence of Providers with properties
See original GitHub issueCommunity Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave “+1” or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
I have a stack that generates a lot of providers. I would like to write tests to ensure they exist and were created with specific properties. This doesn’t appear possible atm. It would be good to have something similar to toHaveResourceWithProperties
but for providers. Please correct me if this is indeed possible.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Introduction to Property Based Testing | by Nicolas Dubien
Property based testing relies on properties. It checks that a function, program or whatever system under test abides by a property. Most of...
Read more >What's the correct way to test for existence of a property on a ...
I have a custom Javascript object that I create with new , and assign properties to based on creation arguments ...
Read more >Choosing properties for property-based testing
But here's a common problem. Everyone who sees a property-based testing tool like FsCheck or QuickCheck thinks that it is amazing… but when...
Read more >How to Check if a Property Exists in a JavaScript Object
The hasOwnProperty() method will check if an object contains a direct property and will return true or false if it exists or not....
Read more >Property-Based Testing - Examples from Business ... - YouTube
I got excited about property -based testing after hearing John Hughes talk at Functional Conf 2016. I tried it that year with QuickCheck, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Are you in the cdk dev slack? You could ask specific questions in the
terraform-cdk
channel.@aayushharwani-aidash This would be adding additional testing capabilities. Take a look here for more information on testing.
Technically this involves adding another function similar to this one, but for looking at the
provider
and maybeterraform.required_providers
sections of the synthesized output: https://github.com/hashicorp/terraform-cdk/blob/a3338f49abc001dafe35833511392f45553b1a61/packages/cdktf/lib/testing/matchers.ts#L151We would also want to update the testing docs to include the new functions.