-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add the ability to mock return values of resources such as kms keys. #4
Comments
I understand the need of being able to test with specific resource attributes values but I don't think those values should be in the assert block. The assert block should only describe the expected result of applying the terraform config under certain circumstances (the input values and the mocked data source). Do you have other example in mind where you'd like more control on the resource attributes ? That would help to design this feature |
A real case I'm dealing with which came up with the thought is
Where I want to assert each one of the above however when ids are not set they are only set as nil
I also was thinking of asserting policies. |
Also I tend to disagree that is doesn't belong in the assert block because it seems the natural place when comparing it with rspec or other mocking systems |
perhaps this would be fine
|
if its language you could change it to
|
indeed, that's better with |
Hello @tomelliot16 |
After playing around a bit somethings I have found that are missing. such as values returned from the provider once resource is created should probably be able to be mocked. Ex:
spec could be something like
The text was updated successfully, but these errors were encountered: