diff options
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/helpers/test_env.rb | 4 | ||||
-rw-r--r-- | spec/support/import_export/common_util.rb | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb index fd41c5c8fe3..47d69ca1f6a 100644 --- a/spec/support/helpers/test_env.rb +++ b/spec/support/helpers/test_env.rb @@ -73,7 +73,9 @@ module TestEnv 'submodule_inside_folder' => 'b491b92', 'png-lfs' => 'fe42f41', 'sha-starting-with-large-number' => '8426165', - 'invalid-utf8-diff-paths' => '99e4853' + 'invalid-utf8-diff-paths' => '99e4853', + 'compare-with-merge-head-source' => 'b5f4399', + 'compare-with-merge-head-target' => '2f1e176' }.freeze # gitlab-test-fork is a fork of gitlab-fork, but we don't necessarily diff --git a/spec/support/import_export/common_util.rb b/spec/support/import_export/common_util.rb index 4e287f36648..1a5668946c6 100644 --- a/spec/support/import_export/common_util.rb +++ b/spec/support/import_export/common_util.rb @@ -38,15 +38,12 @@ module ImportExport end def setup_reader(reader) - case reader - when :legacy_reader - allow_any_instance_of(Gitlab::ImportExport::JSON::LegacyReader::File).to receive(:exist?).and_return(true) - allow_any_instance_of(Gitlab::ImportExport::JSON::NdjsonReader).to receive(:exist?).and_return(false) - when :ndjson_reader + if reader == :ndjson_reader && Feature.enabled?(:project_import_ndjson) allow_any_instance_of(Gitlab::ImportExport::JSON::LegacyReader::File).to receive(:exist?).and_return(false) allow_any_instance_of(Gitlab::ImportExport::JSON::NdjsonReader).to receive(:exist?).and_return(true) else - raise "invalid reader #{reader}. Supported readers: :legacy_reader, :ndjson_reader" + allow_any_instance_of(Gitlab::ImportExport::JSON::LegacyReader::File).to receive(:exist?).and_return(true) + allow_any_instance_of(Gitlab::ImportExport::JSON::NdjsonReader).to receive(:exist?).and_return(false) end end |