-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…12652) * Add tests for existing `dataSourceGoogleIamPolicyRead` function behaviour * Add red (non-passing) tests for new `dataSourceGoogleIamPolicyRead` behaviour * Update tests to check both numbers of bindings from config vs in policy_data output This is necessary because policy_data will need to consolidate bindings, and state for binding{} blocks needs to keep data separate * Update function to pass uncommented tests * Refactor test setup * Change structure of test input data to minimise processing in the test function + add and update test cases Need to check if test assumptions like `bindings on the same role with different conditions, with the same title, are next sorted by condition expression` is correct or not * WIP: Update sorting of bindings to include: role, condition presence, condition fields. * Formatting changes to make .erb match output .go file * Update tests to match the sorting behaviour of the API, update sorting function to pass tests * Refactor existing tests for clarity * Add tests for deduplication and complex sorting scenario * Fix sorting bug where 'lesser' roles is incorrectly sorted to a later index in a list if it has a condition * Refactor `dataSourceGoogleIamPolicyRead` to reduce looping and pull sorting function out into a named function * Make binding map use human-readable keys Signed-off-by: Modular Magician <magic-modules@google.com> Signed-off-by: Modular Magician <magic-modules@google.com>
- Loading branch information
1 parent
f3ad6ee
commit 5633516
Showing
3 changed files
with
493 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
iam: fixed diffs between `policy_data` from `google_iam_policy` data source and policy data in API responses | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.