fix(acctest): compare in depth request body with cassette body #3135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Intro
When comparing a json request body with the cassette ones, if the json dict is nested, like in such case :
The comparison will return true even if the nested values are different (values inside the "member" key)
This lead to behavior such as constant Terraform drift when attempting to replay some query, in particular when creating different objects with nested values like
scaleway_iam_user
https://github.com/scaleway/terraform-provider-scaleway/pull/3126/files#diff-23bcf61d4790cd7c6dff0968222979dc54e167151bfb42c6dbf1f2abfdb26c48Features
Perform in depth comparison between request body and cassette body:
Add a few exceptions for fields that where ignored before, related to
mnq