-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Correct ConfigMap creation logic and update unit tests
- Updated the `createOrUpdateConfigMap` function to handle nested data structures correctly, ensuring that YAML content is properly extracted and parsed. - Adjusted the logic to filter for YAML keys in the ManagedClusterView data and marshal the parsed data into JSON for storage in the ConfigMap. - Ensured that the `Controller` field in the OwnerReferences is set to `false` where necessary to prevent conflicts. - Modified unit tests to reflect the changes in the data structure and logic, ensuring accurate validation of the ConfigMap content and OwnerReferences. - Fixed a bug where the `Scope` check in the `hasODFInfoInScope` function was incorrectly using `Kind` instead of `Resource`. Signed-off-by: vbadrina <[email protected]>
- Loading branch information
Showing
2 changed files
with
33 additions
and
13 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
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