Change implementation of replaceResourcePolicyVariable to fix infinite loop when multiple policy variables are in a single resource.
Add unit tests to cover cases where a resource has multiple policy variables.
Why is this change necessary:
Previously, test cases only covered cases where a resource had one policy variable. Introducing a test case for multiple policy variables exposed an error, which was fixed in these code changes.
How was this change tested:
2 unit tests
Passes all integration tests
Any additional information or context required to review the change:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available:
Description of changes:
Why is this change necessary: Previously, test cases only covered cases where a resource had one policy variable. Introducing a test case for multiple policy variables exposed an error, which was fixed in these code changes.
How was this change tested:
Any additional information or context required to review the change:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.