Use tree folder instead of tree.tar.gz in ndjson project import test fixture
This is a follow-up issue of ndjson project import MR(!27206 (merged)).
In MR !27206 (merged), we created test fixtures for ndjson project import:
spec/fixtures/lib/gitlab/import_export/complex/tree.tar.gz
spec/fixtures/lib/gitlab/import_export/group/tree.tar.gz
spec/fixtures/lib/gitlab/import_export/invalid_json/tree.tar.gz
spec/fixtures/lib/gitlab/import_export/light/tree.tar.gz
spec/fixtures/lib/gitlab/import_export/milestone-iid/tree.tar.gz
spec/fixtures/lib/gitlab/import_export/multi_pipeline_ref_one_external_pr/tree.tar.gz
spec/fixtures/lib/gitlab/import_export/with_invalid_records/tree.tar.gz
For each of these tree.tar.gz
, the Rspec test needs to extract it into a tree
folder before running the test. The only reason we archived tree
into tree.tar.gz
, was to reduce the noise in MR review, because the tree
folder can contain many files.
For the long term, it is more convenient to use the untarred tree
folder directly:
- it removes the complexity to
extract
andcleanup
for the test. Using tarballs requires additional test setup(extract tree folder from tree.tar.gz inbefore do
) and extra cleanup(delete tree folder inafter do
). This introduces unnecessary complexity to maintain spec. This had caused tricky flaky pipeline issues: #213843 (closed) and #213793 (closed) - it allows
git
to better track individual file change, thus make review easier
This issue is to replace these 7 tree.tar.gz
(listed above) with tree
folder.
Edited by Qingyu Zhao