Provide integration tests for Import/Export Members Mapper
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=344945) </details> <!--IssueSummary end--> <!-- Implementation issues are used break-up a large piece of work into small, discrete tasks that can move independently through the build workflow steps. They're typically used to populate a Feature Epic. Once created, an implementation issue is usually refined in order to populate and review the implementation plan and weight. Example workflow: https://about.gitlab.com/handbook/engineering/development/threat-management/planning/diagram.html#plan --> ## Why are we doing this work During the discussion from !71867 we found out that specs are not failing if we remove very important property from `import_export.yml` file for `users`: **`id`**: > I wonder why user id was included in this list to begin with since we filter out all occurrences of `id` :thinking: Are we certain it's not used anywhere? > > I checked members mapper and its actually used there https://gitlab.com/gitlab-org/gitlab/blob/ae74ea54daa39fd2c5941a8b4da8daf14fd82abc/lib/gitlab/import_export/members_mapper.rb#L21-L21 We need this id in order to build a map of member user ids `old_user_id -> new_user_id` in order for the member mapping to work correctly. > > The reason it works is because members mapper runs as a one of the first steps in the import process, before cleaner/permitter filters it out https://gitlab.com/gitlab-org/gitlab/blob/ae74ea54daa39fd2c5941a8b4da8daf14fd82abc/lib/gitlab/import_export/project/tree_restorer.rb#L31-L31 We need to add additional specs to make sure this is tested and that the ID will not be removed by accident from that file. ## Implementation plan - [ ] ~backend add additional spec that will export a project with few user members and import it as a new project and verify if users are properly mapped, <!-- Workflow and other relevant labels # ~"group::" ~"Category:" ~"GitLab Ultimate" Other settings you might want to include when creating the issue. # /assign @ # /epic & -->
issue