Make gitlab:update_project_templates rake task more robust and improve tests
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Spun off from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31592#note_203414463
The rake task gitlab:update_project_templates could be more robust, and the tests could be better
Improvements
- easy: the task has grown fairly large and could be extracted into a class
- somewhat difficult: the task could be refactored to not require a database or a full rails environment
- easy: the tests could cover not just that export "works" but also that projects can be created from the files it generates
- easy: the "unit" tests should use fixtures instead of downloading actual source code archives From GitLab.com
- difficult: the whole project template feature could be simplified, leading to a simpler vendoring process, see https://gitlab.com/gitlab-org/gitlab-ce/issues/66068
Risks
Project templates can break in various ways that might not be covered by tests.
Involved components
Optional: Intended side effects
Optional: Missing test coverage
Edited by 🤖 GitLab Bot 🤖