Commit cd6c74c5 authored by Stan Hu's avatar Stan Hu

Fix broken FOSS build in import_test_coverage_spec.rb

97f102f4 introduced a fixture that is
only present in EE. When the FOSS build attempt to run this test, it
failed because the file did not exist.

To fix this, we only add this fixture under an EE build.

We also need to mute a FOSS-only failure with `project.issues.events`
because that relation is only tested in the EE-specific fixture.

Closes https://gitlab.com/gitlab-org/gitlab/issues/197298
parent 2ab56602
......@@ -17,6 +17,7 @@ describe 'Test coverage of the Project Import' do
# opening a follow-up issue to fix this.
MUTED_RELATIONS = %w[
project.milestones.events.push_event_payload
project.issues.events
project.issues.events.push_event_payload
project.issues.notes.events
project.issues.notes.events.push_event_payload
......@@ -55,13 +56,19 @@ describe 'Test coverage of the Project Import' do
# Note that we use separate fixture to test ee-only features.
# Most of the relations are present in `complex/project.json`
# which is our main fixture.
PROJECT_JSON_FIXTURES_EE =
if Gitlab.ee?
['ee/spec/fixtures/lib/gitlab/import_export/designs/project.json'].freeze
else
[]
end
PROJECT_JSON_FIXTURES = [
'spec/fixtures/lib/gitlab/import_export/complex/project.json',
'spec/fixtures/lib/gitlab/import_export/group/project.json',
'spec/fixtures/lib/gitlab/import_export/light/project.json',
'spec/fixtures/lib/gitlab/import_export/milestone-iid/project.json',
'ee/spec/fixtures/lib/gitlab/import_export/designs/project.json'
].freeze
'spec/fixtures/lib/gitlab/import_export/milestone-iid/project.json'
].freeze + PROJECT_JSON_FIXTURES_EE
it 'ensures that all imported/exported relations are present in test JSONs' do
not_tested_relations = (relations_from_config - tested_relations) - MUTED_RELATIONS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment