Commit 8499a3e2 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Rename JSON to Json

This is needed when we switch to Zeitwerk since our inflections must be
consistent. This makes it consistent with Gitlab::Json.
parent b01c63af
...@@ -22,8 +22,8 @@ module Ci ...@@ -22,8 +22,8 @@ module Ci
validates :build, presence: true validates :build, presence: true
validates :secrets, json_schema: { filename: 'build_metadata_secrets' } validates :secrets, json_schema: { filename: 'build_metadata_secrets' }
serialize :config_options, Serializers::JSON # rubocop:disable Cop/ActiveRecordSerialize serialize :config_options, Serializers::Json # rubocop:disable Cop/ActiveRecordSerialize
serialize :config_variables, Serializers::JSON # rubocop:disable Cop/ActiveRecordSerialize serialize :config_variables, Serializers::Json # rubocop:disable Cop/ActiveRecordSerialize
chronic_duration_attr_reader :timeout_human_readable, :timeout chronic_duration_attr_reader :timeout_human_readable, :timeout
......
...@@ -12,7 +12,7 @@ class MergeRequestContextCommit < ApplicationRecord ...@@ -12,7 +12,7 @@ class MergeRequestContextCommit < ApplicationRecord
validates :sha, presence: true validates :sha, presence: true
validates :sha, uniqueness: { message: 'has already been added' } validates :sha, uniqueness: { message: 'has already been added' }
serialize :trailers, Serializers::JSON # rubocop:disable Cop/ActiveRecordSerialize serialize :trailers, Serializers::Json # rubocop:disable Cop/ActiveRecordSerialize
validates :trailers, json_schema: { filename: 'git_trailers' } validates :trailers, json_schema: { filename: 'git_trailers' }
# Sort by committed date in descending order to ensure latest commits comes on the top # Sort by committed date in descending order to ensure latest commits comes on the top
......
...@@ -12,7 +12,7 @@ class MergeRequestDiffCommit < ApplicationRecord ...@@ -12,7 +12,7 @@ class MergeRequestDiffCommit < ApplicationRecord
sha_attribute :sha sha_attribute :sha
alias_attribute :id, :sha alias_attribute :id, :sha
serialize :trailers, Serializers::JSON # rubocop:disable Cop/ActiveRecordSerialize serialize :trailers, Serializers::Json # rubocop:disable Cop/ActiveRecordSerialize
validates :trailers, json_schema: { filename: 'git_trailers' } validates :trailers, json_schema: { filename: 'git_trailers' }
# Deprecated; use `bulk_insert!` from `BulkInsertSafe` mixin instead. # Deprecated; use `bulk_insert!` from `BulkInsertSafe` mixin instead.
......
...@@ -86,7 +86,7 @@ module BulkImports ...@@ -86,7 +86,7 @@ module BulkImports
# rubocop: disable CodeReuse/Serializer # rubocop: disable CodeReuse/Serializer
def serializer def serializer
@serializer ||= ::Gitlab::ImportExport::JSON::StreamingSerializer.new( @serializer ||= ::Gitlab::ImportExport::Json::StreamingSerializer.new(
portable, portable,
portable_tree, portable_tree,
json_writer, json_writer,
...@@ -96,7 +96,7 @@ module BulkImports ...@@ -96,7 +96,7 @@ module BulkImports
# rubocop: enable CodeReuse/Serializer # rubocop: enable CodeReuse/Serializer
def json_writer def json_writer
@json_writer ||= ::Gitlab::ImportExport::JSON::NdjsonWriter.new(export_path) @json_writer ||= ::Gitlab::ImportExport::Json::NdjsonWriter.new(export_path)
end end
def ndjson_filename def ndjson_filename
......
...@@ -844,7 +844,7 @@ You have to use a serializer to provide a translation layer: ...@@ -844,7 +844,7 @@ You have to use a serializer to provide a translation layer:
```ruby ```ruby
class BuildMetadata class BuildMetadata
serialize :config_options, Serializers::JSON # rubocop:disable Cop/ActiveRecordSerialize serialize :config_options, Serializers::Json # rubocop:disable Cop/ActiveRecordSerialize
end end
``` ```
......
...@@ -39,7 +39,7 @@ module Vulnerabilities ...@@ -39,7 +39,7 @@ module Vulnerabilities
has_one :evidence, class_name: 'Vulnerabilities::Finding::Evidence', inverse_of: :finding, foreign_key: 'vulnerability_occurrence_id' has_one :evidence, class_name: 'Vulnerabilities::Finding::Evidence', inverse_of: :finding, foreign_key: 'vulnerability_occurrence_id'
serialize :config_options, Serializers::JSON # rubocop:disable Cop/ActiveRecordSerialize serialize :config_options, Serializers::Json # rubocop:disable Cop/ActiveRecordSerialize
attr_writer :sha attr_writer :sha
attr_accessor :scan attr_accessor :scan
......
...@@ -51,7 +51,7 @@ module BulkImports ...@@ -51,7 +51,7 @@ module BulkImports
end end
def ndjson_reader(tmp_dir) def ndjson_reader(tmp_dir)
@ndjson_reader ||= Gitlab::ImportExport::JSON::NdjsonReader.new(tmp_dir) @ndjson_reader ||= Gitlab::ImportExport::Json::NdjsonReader.new(tmp_dir)
end end
def relative_resource_url(context) def relative_resource_url(context)
......
...@@ -55,11 +55,11 @@ module Gitlab ...@@ -55,11 +55,11 @@ module Gitlab
def relation_reader def relation_reader
strong_memoize(:relation_reader) do strong_memoize(:relation_reader) do
if @group_hash.present? if @group_hash.present?
ImportExport::JSON::LegacyReader::Hash.new( ImportExport::Json::LegacyReader::Hash.new(
@group_hash, @group_hash,
relation_names: reader.group_relation_names) relation_names: reader.group_relation_names)
else else
ImportExport::JSON::LegacyReader::File.new( ImportExport::Json::LegacyReader::File.new(
File.join(shared.export_path, 'group.json'), File.join(shared.export_path, 'group.json'),
relation_names: reader.group_relation_names) relation_names: reader.group_relation_names)
end end
......
...@@ -118,7 +118,7 @@ module Gitlab ...@@ -118,7 +118,7 @@ module Gitlab
def relation_reader def relation_reader
strong_memoize(:relation_reader) do strong_memoize(:relation_reader) do
ImportExport::JSON::NdjsonReader.new( ImportExport::Json::NdjsonReader.new(
File.join(shared.export_path, 'tree') File.join(shared.export_path, 'tree')
) )
end end
......
...@@ -42,7 +42,7 @@ module Gitlab ...@@ -42,7 +42,7 @@ module Gitlab
end end
def serialize(group) def serialize(group)
ImportExport::JSON::StreamingSerializer.new( ImportExport::Json::StreamingSerializer.new(
group, group,
group_tree, group_tree,
json_writer, json_writer,
...@@ -64,7 +64,7 @@ module Gitlab ...@@ -64,7 +64,7 @@ module Gitlab
end end
def json_writer def json_writer
@json_writer ||= ImportExport::JSON::NdjsonWriter.new(@full_path) @json_writer ||= ImportExport::Json::NdjsonWriter.new(@full_path)
end end
end end
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Gitlab module Gitlab
module ImportExport module ImportExport
module JSON module Json
class LegacyReader class LegacyReader
class File < LegacyReader class File < LegacyReader
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Gitlab module Gitlab
module ImportExport module ImportExport
module JSON module Json
class LegacyWriter class LegacyWriter
include Gitlab::ImportExport::CommandLineUtil include Gitlab::ImportExport::CommandLineUtil
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Gitlab module Gitlab
module ImportExport module ImportExport
module JSON module Json
class NdjsonReader class NdjsonReader
MAX_JSON_DOCUMENT_SIZE = 50.megabytes MAX_JSON_DOCUMENT_SIZE = 50.megabytes
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Gitlab module Gitlab
module ImportExport module ImportExport
module JSON module Json
class NdjsonWriter class NdjsonWriter
include Gitlab::ImportExport::CommandLineUtil include Gitlab::ImportExport::CommandLineUtil
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Gitlab module Gitlab
module ImportExport module ImportExport
module JSON module Json
class StreamingSerializer class StreamingSerializer
include Gitlab::ImportExport::CommandLineUtil include Gitlab::ImportExport::CommandLineUtil
......
...@@ -22,7 +22,7 @@ module Gitlab ...@@ -22,7 +22,7 @@ module Gitlab
private private
def batch_size(exportable) def batch_size(exportable)
Gitlab::ImportExport::JSON::StreamingSerializer.batch_size(exportable) Gitlab::ImportExport::Json::StreamingSerializer.batch_size(exportable)
end end
end end
end end
......
...@@ -56,13 +56,13 @@ module Gitlab ...@@ -56,13 +56,13 @@ module Gitlab
def ndjson_relation_reader def ndjson_relation_reader
return unless Feature.enabled?(:project_import_ndjson, project.namespace, default_enabled: true) return unless Feature.enabled?(:project_import_ndjson, project.namespace, default_enabled: true)
ImportExport::JSON::NdjsonReader.new( ImportExport::Json::NdjsonReader.new(
File.join(shared.export_path, 'tree') File.join(shared.export_path, 'tree')
) )
end end
def legacy_relation_reader def legacy_relation_reader
ImportExport::JSON::LegacyReader::File.new( ImportExport::Json::LegacyReader::File.new(
File.join(shared.export_path, 'project.json'), File.join(shared.export_path, 'project.json'),
relation_names: reader.project_relation_names, relation_names: reader.project_relation_names,
allowed_path: importable_path allowed_path: importable_path
......
...@@ -14,7 +14,7 @@ module Gitlab ...@@ -14,7 +14,7 @@ module Gitlab
end end
def save def save
ImportExport::JSON::StreamingSerializer.new( ImportExport::Json::StreamingSerializer.new(
exportable, exportable,
reader.project_tree, reader.project_tree,
json_writer, json_writer,
...@@ -56,10 +56,10 @@ module Gitlab ...@@ -56,10 +56,10 @@ module Gitlab
@json_writer ||= begin @json_writer ||= begin
if ::Feature.enabled?(:project_export_as_ndjson, @project.namespace, default_enabled: true) if ::Feature.enabled?(:project_export_as_ndjson, @project.namespace, default_enabled: true)
full_path = File.join(@shared.export_path, 'tree') full_path = File.join(@shared.export_path, 'tree')
Gitlab::ImportExport::JSON::NdjsonWriter.new(full_path) Gitlab::ImportExport::Json::NdjsonWriter.new(full_path)
else else
full_path = File.join(@shared.export_path, ImportExport.project_filename) full_path = File.join(@shared.export_path, ImportExport.project_filename)
Gitlab::ImportExport::JSON::LegacyWriter.new(full_path, allowed_path: 'project') Gitlab::ImportExport::Json::LegacyWriter.new(full_path, allowed_path: 'project')
end end
end end
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Serializers module Serializers
# Make the resulting hash have deep indifferent access # Make the resulting hash have deep indifferent access
class JSON class Json
class << self class << self
def dump(obj) def dump(obj)
obj obj
......
...@@ -31,7 +31,7 @@ RSpec.describe Gitlab::ImportExport::Group::TreeSaver do ...@@ -31,7 +31,7 @@ RSpec.describe Gitlab::ImportExport::Group::TreeSaver do
end end
it 'fails to export a group' do it 'fails to export a group' do
allow_next_instance_of(Gitlab::ImportExport::JSON::NdjsonWriter) do |ndjson_writer| allow_next_instance_of(Gitlab::ImportExport::Json::NdjsonWriter) do |ndjson_writer|
allow(ndjson_writer).to receive(:write_relation_array).and_raise(RuntimeError, 'exception') allow(ndjson_writer).to receive(:write_relation_array).and_raise(RuntimeError, 'exception')
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require_relative 'shared_example' require_relative 'shared_example'
RSpec.describe Gitlab::ImportExport::JSON::LegacyReader::File do RSpec.describe Gitlab::ImportExport::Json::LegacyReader::File do
it_behaves_like 'import/export json legacy reader' do it_behaves_like 'import/export json legacy reader' do
let(:valid_path) { 'spec/fixtures/lib/gitlab/import_export/light/project.json' } let(:valid_path) { 'spec/fixtures/lib/gitlab/import_export/light/project.json' }
let(:data) { valid_path } let(:data) { valid_path }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require_relative 'shared_example' require_relative 'shared_example'
RSpec.describe Gitlab::ImportExport::JSON::LegacyReader::Hash do RSpec.describe Gitlab::ImportExport::Json::LegacyReader::Hash do
it_behaves_like 'import/export json legacy reader' do it_behaves_like 'import/export json legacy reader' do
let(:path) { 'spec/fixtures/lib/gitlab/import_export/light/project.json' } let(:path) { 'spec/fixtures/lib/gitlab/import_export/light/project.json' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe Gitlab::ImportExport::JSON::LegacyWriter do RSpec.describe Gitlab::ImportExport::Json::LegacyWriter do
let(:path) { "#{Dir.tmpdir}/legacy_writer_spec/test.json" } let(:path) { "#{Dir.tmpdir}/legacy_writer_spec/test.json" }
subject do subject do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe Gitlab::ImportExport::JSON::NdjsonReader do RSpec.describe Gitlab::ImportExport::Json::NdjsonReader do
include ImportExport::CommonUtil include ImportExport::CommonUtil
let(:fixture) { 'spec/fixtures/lib/gitlab/import_export/light/tree' } let(:fixture) { 'spec/fixtures/lib/gitlab/import_export/light/tree' }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require "spec_helper" require "spec_helper"
RSpec.describe Gitlab::ImportExport::JSON::NdjsonWriter do RSpec.describe Gitlab::ImportExport::Json::NdjsonWriter do
include ImportExport::CommonUtil include ImportExport::CommonUtil
let(:path) { "#{Dir.tmpdir}/ndjson_writer_spec/tree" } let(:path) { "#{Dir.tmpdir}/ndjson_writer_spec/tree" }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe Gitlab::ImportExport::JSON::StreamingSerializer do RSpec.describe Gitlab::ImportExport::Json::StreamingSerializer do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:release) { create(:release) } let_it_be(:release) { create(:release) }
let_it_be(:group) { create(:group) } let_it_be(:group) { create(:group) }
...@@ -27,7 +27,7 @@ RSpec.describe Gitlab::ImportExport::JSON::StreamingSerializer do ...@@ -27,7 +27,7 @@ RSpec.describe Gitlab::ImportExport::JSON::StreamingSerializer do
end end
let(:exportable_path) { 'project' } let(:exportable_path) { 'project' }
let(:json_writer) { instance_double('Gitlab::ImportExport::JSON::LegacyWriter') } let(:json_writer) { instance_double('Gitlab::ImportExport::Json::LegacyWriter') }
let(:hash) { { name: exportable.name, description: exportable.description }.stringify_keys } let(:hash) { { name: exportable.name, description: exportable.description }.stringify_keys }
let(:include) { [] } let(:include) { [] }
let(:custom_orderer) { nil } let(:custom_orderer) { nil }
......
...@@ -28,7 +28,7 @@ RSpec.describe Gitlab::ImportExport::LegacyRelationTreeSaver do ...@@ -28,7 +28,7 @@ RSpec.describe Gitlab::ImportExport::LegacyRelationTreeSaver do
stub_feature_flags(export_reduce_relation_batch_size: true) stub_feature_flags(export_reduce_relation_batch_size: true)
end end
include_examples 'FastHashSerializer with batch size', Gitlab::ImportExport::JSON::StreamingSerializer::SMALLER_BATCH_SIZE include_examples 'FastHashSerializer with batch size', Gitlab::ImportExport::Json::StreamingSerializer::SMALLER_BATCH_SIZE
end end
context 'when export_reduce_relation_batch_size feature flag is disabled' do context 'when export_reduce_relation_batch_size feature flag is disabled' do
...@@ -36,7 +36,7 @@ RSpec.describe Gitlab::ImportExport::LegacyRelationTreeSaver do ...@@ -36,7 +36,7 @@ RSpec.describe Gitlab::ImportExport::LegacyRelationTreeSaver do
stub_feature_flags(export_reduce_relation_batch_size: false) stub_feature_flags(export_reduce_relation_batch_size: false)
end end
include_examples 'FastHashSerializer with batch size', Gitlab::ImportExport::JSON::StreamingSerializer::BATCH_SIZE include_examples 'FastHashSerializer with batch size', Gitlab::ImportExport::Json::StreamingSerializer::BATCH_SIZE
end end
end end
end end
...@@ -77,7 +77,7 @@ RSpec.describe Gitlab::ImportExport::Project::Sample::RelationTreeRestorer do ...@@ -77,7 +77,7 @@ RSpec.describe Gitlab::ImportExport::Project::Sample::RelationTreeRestorer do
let(:relation_factory) { Gitlab::ImportExport::Project::Sample::RelationFactory } let(:relation_factory) { Gitlab::ImportExport::Project::Sample::RelationFactory }
let(:reader) { Gitlab::ImportExport::Reader.new(shared: shared) } let(:reader) { Gitlab::ImportExport::Reader.new(shared: shared) }
let(:path) { 'spec/fixtures/lib/gitlab/import_export/sample_data/tree' } let(:path) { 'spec/fixtures/lib/gitlab/import_export/sample_data/tree' }
let(:relation_reader) { Gitlab::ImportExport::JSON::NdjsonReader.new(path) } let(:relation_reader) { Gitlab::ImportExport::Json::NdjsonReader.new(path) }
it 'initializes relation_factory with date_calculator as parameter' do it 'initializes relation_factory with date_calculator as parameter' do
expect(Gitlab::ImportExport::Project::Sample::RelationFactory).to receive(:create).with(hash_including(:date_calculator)).at_least(:once).times expect(Gitlab::ImportExport::Project::Sample::RelationFactory).to receive(:create).with(hash_including(:date_calculator)).at_least(:once).times
......
...@@ -820,9 +820,9 @@ RSpec.describe Gitlab::ImportExport::Project::TreeRestorer do ...@@ -820,9 +820,9 @@ RSpec.describe Gitlab::ImportExport::Project::TreeRestorer do
end end
before do before do
allow_any_instance_of(Gitlab::ImportExport::JSON::LegacyReader::File).to receive(:exist?).and_return(true) 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) allow_any_instance_of(Gitlab::ImportExport::Json::NdjsonReader).to receive(:exist?).and_return(false)
allow_any_instance_of(Gitlab::ImportExport::JSON::LegacyReader::File).to receive(:tree_hash) { tree_hash } allow_any_instance_of(Gitlab::ImportExport::Json::LegacyReader::File).to receive(:tree_hash) { tree_hash }
end end
context 'no group visibility' do context 'no group visibility' do
......
...@@ -96,7 +96,7 @@ RSpec.describe Gitlab::ImportExport::RelationTreeRestorer do ...@@ -96,7 +96,7 @@ RSpec.describe Gitlab::ImportExport::RelationTreeRestorer do
context 'using legacy reader' do context 'using legacy reader' do
let(:path) { 'spec/fixtures/lib/gitlab/import_export/complex/project.json' } let(:path) { 'spec/fixtures/lib/gitlab/import_export/complex/project.json' }
let(:relation_reader) do let(:relation_reader) do
Gitlab::ImportExport::JSON::LegacyReader::File.new( Gitlab::ImportExport::Json::LegacyReader::File.new(
path, path,
relation_names: reader.project_relation_names, relation_names: reader.project_relation_names,
allowed_path: 'project' allowed_path: 'project'
...@@ -117,14 +117,14 @@ RSpec.describe Gitlab::ImportExport::RelationTreeRestorer do ...@@ -117,14 +117,14 @@ RSpec.describe Gitlab::ImportExport::RelationTreeRestorer do
context 'using ndjson reader' do context 'using ndjson reader' do
let(:path) { 'spec/fixtures/lib/gitlab/import_export/complex/tree' } let(:path) { 'spec/fixtures/lib/gitlab/import_export/complex/tree' }
let(:relation_reader) { Gitlab::ImportExport::JSON::NdjsonReader.new(path) } let(:relation_reader) { Gitlab::ImportExport::Json::NdjsonReader.new(path) }
it_behaves_like 'import project successfully' it_behaves_like 'import project successfully'
end end
context 'with invalid relations' do context 'with invalid relations' do
let(:path) { 'spec/fixtures/lib/gitlab/import_export/project_with_invalid_relations/tree' } let(:path) { 'spec/fixtures/lib/gitlab/import_export/project_with_invalid_relations/tree' }
let(:relation_reader) { Gitlab::ImportExport::JSON::NdjsonReader.new(path) } let(:relation_reader) { Gitlab::ImportExport::Json::NdjsonReader.new(path) }
it 'logs the invalid relation and its errors' do it 'logs the invalid relation and its errors' do
expect(relation_tree_restorer.shared.logger) expect(relation_tree_restorer.shared.logger)
...@@ -151,7 +151,7 @@ RSpec.describe Gitlab::ImportExport::RelationTreeRestorer do ...@@ -151,7 +151,7 @@ RSpec.describe Gitlab::ImportExport::RelationTreeRestorer do
let(:object_builder) { Gitlab::ImportExport::Group::ObjectBuilder } let(:object_builder) { Gitlab::ImportExport::Group::ObjectBuilder }
let(:relation_factory) { Gitlab::ImportExport::Group::RelationFactory } let(:relation_factory) { Gitlab::ImportExport::Group::RelationFactory }
let(:relation_reader) do let(:relation_reader) do
Gitlab::ImportExport::JSON::LegacyReader::File.new( Gitlab::ImportExport::Json::LegacyReader::File.new(
path, path,
relation_names: reader.group_relation_names) relation_names: reader.group_relation_names)
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'fast_spec_helper' require 'fast_spec_helper'
RSpec.describe Serializers::JSON do RSpec.describe Serializers::Json do
describe '.dump' do describe '.dump' do
let(:obj) { { key: "value" } } let(:obj) { { key: "value" } }
......
...@@ -20,11 +20,11 @@ module ImportExport ...@@ -20,11 +20,11 @@ module ImportExport
def setup_reader(reader) def setup_reader(reader)
if reader == :ndjson_reader && Feature.enabled?(:project_import_ndjson, default_enabled: true) if reader == :ndjson_reader && Feature.enabled?(:project_import_ndjson, default_enabled: true)
allow_any_instance_of(Gitlab::ImportExport::JSON::LegacyReader::File).to receive(:exist?).and_return(false) 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) allow_any_instance_of(Gitlab::ImportExport::Json::NdjsonReader).to receive(:exist?).and_return(true)
else else
allow_any_instance_of(Gitlab::ImportExport::JSON::LegacyReader::File).to receive(:exist?).and_return(true) 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) allow_any_instance_of(Gitlab::ImportExport::Json::NdjsonReader).to receive(:exist?).and_return(false)
end end
end end
......
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