This PR adds a new mapping command for idm mappings, resolving issue #375. Additionally, it adds an additional flag for idm exports to optionally extract mappings from sync.json into separate files.
A PR in frodo-lib was created to add and fix certain functions of the MappingOps library that this PR relies on.
One update that was made in this PR was to how files are extracted. Instead of storing file paths in the exports based on the working directory, it now stores file paths based on where the export file is located. This was done so that when performing imports from a different working directory, you may still use the -f flag to correctly read the extracted files. The only place file extraction was done prior was in script exports, but now extraction is also done when exporting sync mappings by extracting mappings from the sync.json file during separate exports. The sync.json file is still kept around in order to keep track of the original sync order of the mappings. As a result of this change, ScriptOps was altered slightly to be consistent, so any changes to that and script tests were due to this small change.
Additionally, I was having trouble updating the mocks for the config import tests, which is why they are currently failing. Whenever I updated the mocks and ran the tests, the tests would give me an error stating that there were missing mock recordings. This still happens on the version of frodo before I made these changes as well, so I wonder if it has something to do with the account I am using for testing rather than the changes I made. Despite the failing tests, I wanted to at least get the PR out so it can be reviewed since I'm not sure I will be able to get them passing with my account.
This PR adds a new mapping command for idm mappings, resolving issue #375. Additionally, it adds an additional flag for idm exports to optionally extract mappings from sync.json into separate files.
A PR in frodo-lib was created to add and fix certain functions of the MappingOps library that this PR relies on.
One update that was made in this PR was to how files are extracted. Instead of storing file paths in the exports based on the working directory, it now stores file paths based on where the export file is located. This was done so that when performing imports from a different working directory, you may still use the -f flag to correctly read the extracted files. The only place file extraction was done prior was in script exports, but now extraction is also done when exporting sync mappings by extracting mappings from the sync.json file during separate exports. The sync.json file is still kept around in order to keep track of the original sync order of the mappings. As a result of this change, ScriptOps was altered slightly to be consistent, so any changes to that and script tests were due to this small change.
Additionally, I was having trouble updating the mocks for the config import tests, which is why they are currently failing. Whenever I updated the mocks and ran the tests, the tests would give me an error stating that there were missing mock recordings. This still happens on the version of frodo before I made these changes as well, so I wonder if it has something to do with the account I am using for testing rather than the changes I made. Despite the failing tests, I wanted to at least get the PR out so it can be reviewed since I'm not sure I will be able to get them passing with my account.