diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/lib/gitlab/import_export | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) | |
download | gitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/lib/gitlab/import_export')
68 files changed, 121 insertions, 138 deletions
diff --git a/spec/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy_spec.rb b/spec/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy_spec.rb index 1631de393b5..fc794f11499 100644 --- a/spec/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy_spec.rb +++ b/spec/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::AfterExportStrategies::BaseAfterExportStrategy do +RSpec.describe Gitlab::ImportExport::AfterExportStrategies::BaseAfterExportStrategy do before do allow_next_instance_of(ProjectExportWorker) do |job| allow(job).to receive(:jid).and_return(SecureRandom.hex(8)) diff --git a/spec/lib/gitlab/import_export/after_export_strategies/web_upload_strategy_spec.rb b/spec/lib/gitlab/import_export/after_export_strategies/web_upload_strategy_spec.rb index 7792daed99c..38f1d48798b 100644 --- a/spec/lib/gitlab/import_export/after_export_strategies/web_upload_strategy_spec.rb +++ b/spec/lib/gitlab/import_export/after_export_strategies/web_upload_strategy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::AfterExportStrategies::WebUploadStrategy do +RSpec.describe Gitlab::ImportExport::AfterExportStrategies::WebUploadStrategy do include StubRequests before do diff --git a/spec/lib/gitlab/import_export/after_export_strategy_builder_spec.rb b/spec/lib/gitlab/import_export/after_export_strategy_builder_spec.rb index 9fe9e2eb73d..91a3dce0b4e 100644 --- a/spec/lib/gitlab/import_export/after_export_strategy_builder_spec.rb +++ b/spec/lib/gitlab/import_export/after_export_strategy_builder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::AfterExportStrategyBuilder do +RSpec.describe Gitlab::ImportExport::AfterExportStrategyBuilder do let!(:strategies_namespace) { 'Gitlab::ImportExport::AfterExportStrategies' } describe '.build!' do diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index ef9321dc1fc..02500778426 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -31,6 +31,8 @@ issues: - closed_by - epic_issue - epic +- feature_flag_issues +- feature_flags - designs - design_versions - description_versions @@ -95,6 +97,7 @@ snippets: - user_agent_detail - user_mentions - snippet_repository +- statistics releases: - author - project @@ -217,13 +220,15 @@ ci_pipelines: - parent_pipeline - downstream_bridges - job_artifacts -- vulnerabilities_occurrence_pipelines +- vulnerabilities_finding_pipelines - vulnerability_findings - pipeline_config - security_scans - daily_build_group_report_results - latest_builds - daily_report_results +- latest_builds_report_results +- messages ci_refs: - project - ci_pipelines @@ -317,6 +322,7 @@ project: - last_event - services - campfire_service +- confluence_service - discord_service - drone_ci_service - emails_on_push_service @@ -458,6 +464,8 @@ project: - vulnerability_feedback - vulnerability_identifiers - vulnerability_scanners +- dast_site_profiles +- dast_sites - operations_feature_flags - operations_feature_flags_client - operations_feature_flags_user_lists @@ -465,6 +473,7 @@ project: - prometheus_alert_events - self_managed_prometheus_alert_events - software_license_policies +- software_licenses - project_registry - packages - package_files @@ -505,6 +514,7 @@ project: - freeze_periods - webex_teams_service - build_report_results +- vulnerability_statistic award_emoji: - awardable - user @@ -569,6 +579,9 @@ self_managed_prometheus_alert_events: epic_issues: - issue - epic +feature_flag_issues: +- issue +- feature_flag tracing_setting: - project reviews: diff --git a/spec/lib/gitlab/import_export/attribute_cleaner_spec.rb b/spec/lib/gitlab/import_export/attribute_cleaner_spec.rb index 65e99c0c3b8..733be7fc226 100644 --- a/spec/lib/gitlab/import_export/attribute_cleaner_spec.rb +++ b/spec/lib/gitlab/import_export/attribute_cleaner_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::AttributeCleaner do +RSpec.describe Gitlab::ImportExport::AttributeCleaner do let(:relation_class) { double('relation_class').as_null_object } let(:unsafe_hash) do { diff --git a/spec/lib/gitlab/import_export/attribute_configuration_spec.rb b/spec/lib/gitlab/import_export/attribute_configuration_spec.rb index f97dafc6bf9..0581f07dd3f 100644 --- a/spec/lib/gitlab/import_export/attribute_configuration_spec.rb +++ b/spec/lib/gitlab/import_export/attribute_configuration_spec.rb @@ -9,7 +9,7 @@ require 'spec_helper' # to be included as part of the export, or blacklist them using the import_export.yml configuration file. # Likewise, new models added to import_export.yml, will need to be added with their correspondent attributes # to this spec. -describe 'Import/Export attribute configuration' do +RSpec.describe 'Import/Export attribute configuration' do include ConfigurationHelper let(:safe_attributes_file) { 'spec/lib/gitlab/import_export/safe_model_attributes.yml' } diff --git a/spec/lib/gitlab/import_export/attributes_finder_spec.rb b/spec/lib/gitlab/import_export/attributes_finder_spec.rb index 3cbc1375d6e..7f6ebf577af 100644 --- a/spec/lib/gitlab/import_export/attributes_finder_spec.rb +++ b/spec/lib/gitlab/import_export/attributes_finder_spec.rb @@ -2,7 +2,7 @@ require 'fast_spec_helper' -describe Gitlab::ImportExport::AttributesFinder do +RSpec.describe Gitlab::ImportExport::AttributesFinder do describe '#find_root' do subject { described_class.new(config: config).find_root(model_key) } diff --git a/spec/lib/gitlab/import_export/attributes_permitter_spec.rb b/spec/lib/gitlab/import_export/attributes_permitter_spec.rb index d6217811b9c..0c1b1cd74bf 100644 --- a/spec/lib/gitlab/import_export/attributes_permitter_spec.rb +++ b/spec/lib/gitlab/import_export/attributes_permitter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::AttributesPermitter do +RSpec.describe Gitlab::ImportExport::AttributesPermitter do let(:yml_config) do <<-EOF tree: diff --git a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb index 662e1a5eaab..994132239b9 100644 --- a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::AvatarRestorer do +RSpec.describe Gitlab::ImportExport::AvatarRestorer do include UploadHelpers let(:shared) { project.import_export_shared } diff --git a/spec/lib/gitlab/import_export/avatar_saver_spec.rb b/spec/lib/gitlab/import_export/avatar_saver_spec.rb index d2349e47c0a..334d930c47c 100644 --- a/spec/lib/gitlab/import_export/avatar_saver_spec.rb +++ b/spec/lib/gitlab/import_export/avatar_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::AvatarSaver do +RSpec.describe Gitlab::ImportExport::AvatarSaver do let(:shared) { project.import_export_shared } let(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" } let(:project_with_avatar) { create(:project, avatar: fixture_file_upload("spec/fixtures/dk.png", "image/png")) } diff --git a/spec/lib/gitlab/import_export/base/object_builder_spec.rb b/spec/lib/gitlab/import_export/base/object_builder_spec.rb index e5242ae0bfc..d560c8ea5a7 100644 --- a/spec/lib/gitlab/import_export/base/object_builder_spec.rb +++ b/spec/lib/gitlab/import_export/base/object_builder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Base::ObjectBuilder do +RSpec.describe Gitlab::ImportExport::Base::ObjectBuilder do let(:project) do create(:project, :repository, :builds_disabled, diff --git a/spec/lib/gitlab/import_export/base/relation_factory_spec.rb b/spec/lib/gitlab/import_export/base/relation_factory_spec.rb index 50d93763ad6..09e6e5a03bb 100644 --- a/spec/lib/gitlab/import_export/base/relation_factory_spec.rb +++ b/spec/lib/gitlab/import_export/base/relation_factory_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Base::RelationFactory do +RSpec.describe Gitlab::ImportExport::Base::RelationFactory do let(:user) { create(:admin) } let(:project) { create(:project) } let(:members_mapper) { double('members_mapper').as_null_object } diff --git a/spec/lib/gitlab/import_export/command_line_util_spec.rb b/spec/lib/gitlab/import_export/command_line_util_spec.rb index 8e5e0aefac0..b00a2597681 100644 --- a/spec/lib/gitlab/import_export/command_line_util_spec.rb +++ b/spec/lib/gitlab/import_export/command_line_util_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::CommandLineUtil do +RSpec.describe Gitlab::ImportExport::CommandLineUtil do include ExportFileHelper let(:path) { "#{Dir.tmpdir}/symlink_test" } diff --git a/spec/lib/gitlab/import_export/config_spec.rb b/spec/lib/gitlab/import_export/config_spec.rb index f09a29b84db..40cf75779b6 100644 --- a/spec/lib/gitlab/import_export/config_spec.rb +++ b/spec/lib/gitlab/import_export/config_spec.rb @@ -3,7 +3,7 @@ require 'fast_spec_helper' require 'rspec-parameterized' -describe Gitlab::ImportExport::Config do +RSpec.describe Gitlab::ImportExport::Config do let(:yaml_file) { described_class.new } describe '#to_h' do diff --git a/spec/lib/gitlab/import_export/design_repo_restorer_spec.rb b/spec/lib/gitlab/import_export/design_repo_restorer_spec.rb index 5662b8af280..b311a02833c 100644 --- a/spec/lib/gitlab/import_export/design_repo_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/design_repo_restorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::DesignRepoRestorer do +RSpec.describe Gitlab::ImportExport::DesignRepoRestorer do include GitHelpers describe 'bundle a design Git repo' do diff --git a/spec/lib/gitlab/import_export/design_repo_saver_spec.rb b/spec/lib/gitlab/import_export/design_repo_saver_spec.rb index bff48e8b52a..2575d209db5 100644 --- a/spec/lib/gitlab/import_export/design_repo_saver_spec.rb +++ b/spec/lib/gitlab/import_export/design_repo_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::DesignRepoSaver do +RSpec.describe Gitlab::ImportExport::DesignRepoSaver do describe 'bundle a design Git repo' do let_it_be(:user) { create(:user) } let_it_be(:design) { create(:design, :with_file, versions_count: 1) } diff --git a/spec/lib/gitlab/import_export/error_spec.rb b/spec/lib/gitlab/import_export/error_spec.rb index 067f7049097..015133a399b 100644 --- a/spec/lib/gitlab/import_export/error_spec.rb +++ b/spec/lib/gitlab/import_export/error_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Error do +RSpec.describe Gitlab::ImportExport::Error do describe '.permission_error' do subject(:error) do described_class.permission_error(user, importable) diff --git a/spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb b/spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb index 916ed692a05..5b6be0b3198 100644 --- a/spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb +++ b/spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::FastHashSerializer do +RSpec.describe Gitlab::ImportExport::FastHashSerializer do # FastHashSerializer#execute generates the hash which is not easily accessible # and includes `JSONBatchRelation` items which are serialized at this point. # Wrapping the result into JSON generating/parsing is for making @@ -175,14 +175,6 @@ describe Gitlab::ImportExport::FastHashSerializer do expect(subject['merge_requests'].first['resource_label_events']).not_to be_empty end - it 'saves the correct service type' do - expect(subject['services'].first['type']).to eq('CustomIssueTrackerService') - end - - it 'saves the properties for a service' do - expect(subject['services'].first['properties']).to eq('one' => 'value') - end - it 'has project feature' do project_feature = subject['project_feature'] expect(project_feature).not_to be_empty diff --git a/spec/lib/gitlab/import_export/file_importer_spec.rb b/spec/lib/gitlab/import_export/file_importer_spec.rb index 7c54c5f2da1..47485cc7edb 100644 --- a/spec/lib/gitlab/import_export/file_importer_spec.rb +++ b/spec/lib/gitlab/import_export/file_importer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::FileImporter do +RSpec.describe Gitlab::ImportExport::FileImporter do include ExportFileHelper let(:shared) { Gitlab::ImportExport::Shared.new(nil) } diff --git a/spec/lib/gitlab/import_export/fork_spec.rb b/spec/lib/gitlab/import_export/fork_spec.rb index bb79331efac..ef7394053b9 100644 --- a/spec/lib/gitlab/import_export/fork_spec.rb +++ b/spec/lib/gitlab/import_export/fork_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'forked project import' do +RSpec.describe 'forked project import' do include ProjectForksHelper let(:user) { create(:user) } diff --git a/spec/lib/gitlab/import_export/group/legacy_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/group/legacy_tree_restorer_spec.rb index 4c926da1436..bfcd4994995 100644 --- a/spec/lib/gitlab/import_export/group/legacy_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/group/legacy_tree_restorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Group::LegacyTreeRestorer do +RSpec.describe Gitlab::ImportExport::Group::LegacyTreeRestorer do include ImportExport::CommonUtil let(:shared) { Gitlab::ImportExport::Shared.new(group) } diff --git a/spec/lib/gitlab/import_export/group/legacy_tree_saver_spec.rb b/spec/lib/gitlab/import_export/group/legacy_tree_saver_spec.rb index a0490c255aa..6b324b952dc 100644 --- a/spec/lib/gitlab/import_export/group/legacy_tree_saver_spec.rb +++ b/spec/lib/gitlab/import_export/group/legacy_tree_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Group::LegacyTreeSaver do +RSpec.describe Gitlab::ImportExport::Group::LegacyTreeSaver do describe 'saves the group tree into a json object' do let(:shared) { Gitlab::ImportExport::Shared.new(group) } let(:group_tree_saver) { described_class.new(group: group, current_user: user, shared: shared) } diff --git a/spec/lib/gitlab/import_export/group/object_builder_spec.rb b/spec/lib/gitlab/import_export/group/object_builder_spec.rb index 781670b0aa5..028bd5463a1 100644 --- a/spec/lib/gitlab/import_export/group/object_builder_spec.rb +++ b/spec/lib/gitlab/import_export/group/object_builder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Group::ObjectBuilder do +RSpec.describe Gitlab::ImportExport::Group::ObjectBuilder do let(:group) { create(:group) } let(:base_attributes) do { diff --git a/spec/lib/gitlab/import_export/group/relation_factory_spec.rb b/spec/lib/gitlab/import_export/group/relation_factory_spec.rb index 332648d5c89..eb9a3fa9bd8 100644 --- a/spec/lib/gitlab/import_export/group/relation_factory_spec.rb +++ b/spec/lib/gitlab/import_export/group/relation_factory_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Group::RelationFactory do +RSpec.describe Gitlab::ImportExport::Group::RelationFactory do let(:group) { create(:group) } let(:members_mapper) { double('members_mapper').as_null_object } let(:user) { create(:admin) } diff --git a/spec/lib/gitlab/import_export/group/tree_restorer_spec.rb b/spec/lib/gitlab/import_export/group/tree_restorer_spec.rb index 327f36c664e..6cc16ee9cbb 100644 --- a/spec/lib/gitlab/import_export/group/tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/group/tree_restorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Group::TreeRestorer do +RSpec.describe Gitlab::ImportExport::Group::TreeRestorer do include ImportExport::CommonUtil describe 'restore group tree' do diff --git a/spec/lib/gitlab/import_export/group/tree_saver_spec.rb b/spec/lib/gitlab/import_export/group/tree_saver_spec.rb index 06e8484a3cb..908896e4891 100644 --- a/spec/lib/gitlab/import_export/group/tree_saver_spec.rb +++ b/spec/lib/gitlab/import_export/group/tree_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Group::TreeSaver do +RSpec.describe Gitlab::ImportExport::Group::TreeSaver do describe 'saves the group tree into a json object' do let_it_be(:user) { create(:user) } let_it_be(:group) { setup_groups } diff --git a/spec/lib/gitlab/import_export/hash_util_spec.rb b/spec/lib/gitlab/import_export/hash_util_spec.rb index b97c6665d0e..467342e6e96 100644 --- a/spec/lib/gitlab/import_export/hash_util_spec.rb +++ b/spec/lib/gitlab/import_export/hash_util_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::HashUtil do +RSpec.describe Gitlab::ImportExport::HashUtil do let(:stringified_array) { [{ 'test' => 1 }] } let(:stringified_array_with_date) { [{ 'test_date' => '2016-04-06 06:17:44 +0200' }] } diff --git a/spec/lib/gitlab/import_export/import_export_equivalence_spec.rb b/spec/lib/gitlab/import_export/import_export_equivalence_spec.rb index 95df9cd0e6e..18f2e8f80d7 100644 --- a/spec/lib/gitlab/import_export/import_export_equivalence_spec.rb +++ b/spec/lib/gitlab/import_export/import_export_equivalence_spec.rb @@ -13,7 +13,7 @@ require 'spec_helper' # - randomly generated fields like tokens # # as these are expected to change between import/export cycles. -describe Gitlab::ImportExport do +RSpec.describe Gitlab::ImportExport do include ImportExport::CommonUtil include ConfigurationHelper include ImportExport::ProjectTreeExpectations diff --git a/spec/lib/gitlab/import_export/import_export_spec.rb b/spec/lib/gitlab/import_export/import_export_spec.rb index 300ba66ee5b..62b4717fc96 100644 --- a/spec/lib/gitlab/import_export/import_export_spec.rb +++ b/spec/lib/gitlab/import_export/import_export_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport do +RSpec.describe Gitlab::ImportExport do describe 'export filename' do let(:group) { create(:group, :nested) } let(:project) { create(:project, :public, path: 'project-path', namespace: group) } diff --git a/spec/lib/gitlab/import_export/import_failure_service_spec.rb b/spec/lib/gitlab/import_export/import_failure_service_spec.rb index 324328181e4..c8bb067d40c 100644 --- a/spec/lib/gitlab/import_export/import_failure_service_spec.rb +++ b/spec/lib/gitlab/import_export/import_failure_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::ImportFailureService do +RSpec.describe Gitlab::ImportExport::ImportFailureService do let(:importable) { create(:project, :builds_enabled, :issues_disabled, name: 'project', path: 'project') } let(:label) { create(:label) } let(:subject) { described_class.new(importable) } diff --git a/spec/lib/gitlab/import_export/import_test_coverage_spec.rb b/spec/lib/gitlab/import_export/import_test_coverage_spec.rb index c5a7327332e..9737a0f39fc 100644 --- a/spec/lib/gitlab/import_export/import_test_coverage_spec.rb +++ b/spec/lib/gitlab/import_export/import_test_coverage_spec.rb @@ -7,7 +7,7 @@ require 'spec_helper' # Fixture JSONs we use for testing Import such as # `spec/fixtures/lib/gitlab/import_export/complex/project.json` # should include these relations being non-empty. -describe 'Test coverage of the Project Import' do +RSpec.describe 'Test coverage of the Project Import' do include ConfigurationHelper # `muted_relations` is a technical debt. diff --git a/spec/lib/gitlab/import_export/importer_spec.rb b/spec/lib/gitlab/import_export/importer_spec.rb index 494f7e3a00d..dc44296321c 100644 --- a/spec/lib/gitlab/import_export/importer_spec.rb +++ b/spec/lib/gitlab/import_export/importer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Importer do +RSpec.describe Gitlab::ImportExport::Importer do let(:user) { create(:user) } let(:test_path) { "#{Dir.tmpdir}/importer_spec" } let(:shared) { project.import_export_shared } diff --git a/spec/lib/gitlab/import_export/json/legacy_reader/file_spec.rb b/spec/lib/gitlab/import_export/json/legacy_reader/file_spec.rb index 99932404fd9..9c7f41cbb89 100644 --- a/spec/lib/gitlab/import_export/json/legacy_reader/file_spec.rb +++ b/spec/lib/gitlab/import_export/json/legacy_reader/file_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require_relative 'shared_example.rb' -describe Gitlab::ImportExport::JSON::LegacyReader::File do +RSpec.describe Gitlab::ImportExport::JSON::LegacyReader::File do it_behaves_like 'import/export json legacy reader' do let(:valid_path) { 'spec/fixtures/lib/gitlab/import_export/light/project.json' } let(:data) { valid_path } diff --git a/spec/lib/gitlab/import_export/json/legacy_reader/hash_spec.rb b/spec/lib/gitlab/import_export/json/legacy_reader/hash_spec.rb index e793dc7339d..d0899accf59 100644 --- a/spec/lib/gitlab/import_export/json/legacy_reader/hash_spec.rb +++ b/spec/lib/gitlab/import_export/json/legacy_reader/hash_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require_relative 'shared_example.rb' -describe Gitlab::ImportExport::JSON::LegacyReader::Hash do +RSpec.describe Gitlab::ImportExport::JSON::LegacyReader::Hash do it_behaves_like 'import/export json legacy reader' do let(:path) { 'spec/fixtures/lib/gitlab/import_export/light/project.json' } diff --git a/spec/lib/gitlab/import_export/json/legacy_writer_spec.rb b/spec/lib/gitlab/import_export/json/legacy_writer_spec.rb index 1f39b26e46a..eb7a2d4aa8b 100644 --- a/spec/lib/gitlab/import_export/json/legacy_writer_spec.rb +++ b/spec/lib/gitlab/import_export/json/legacy_writer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::JSON::LegacyWriter do +RSpec.describe Gitlab::ImportExport::JSON::LegacyWriter do let(:path) { "#{Dir.tmpdir}/legacy_writer_spec/test.json" } subject do diff --git a/spec/lib/gitlab/import_export/json/ndjson_reader_spec.rb b/spec/lib/gitlab/import_export/json/ndjson_reader_spec.rb index 34e8b1ddd59..a347d835428 100644 --- a/spec/lib/gitlab/import_export/json/ndjson_reader_spec.rb +++ b/spec/lib/gitlab/import_export/json/ndjson_reader_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::JSON::NdjsonReader do +RSpec.describe Gitlab::ImportExport::JSON::NdjsonReader do include ImportExport::CommonUtil let(:fixture) { 'spec/fixtures/lib/gitlab/import_export/light/tree' } diff --git a/spec/lib/gitlab/import_export/json/ndjson_writer_spec.rb b/spec/lib/gitlab/import_export/json/ndjson_writer_spec.rb index bae3672474c..0af74dee604 100644 --- a/spec/lib/gitlab/import_export/json/ndjson_writer_spec.rb +++ b/spec/lib/gitlab/import_export/json/ndjson_writer_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Gitlab::ImportExport::JSON::NdjsonWriter do +RSpec.describe Gitlab::ImportExport::JSON::NdjsonWriter do include ImportExport::CommonUtil let(:path) { "#{Dir.tmpdir}/ndjson_writer_spec/tree" } diff --git a/spec/lib/gitlab/import_export/json/streaming_serializer_spec.rb b/spec/lib/gitlab/import_export/json/streaming_serializer_spec.rb index 30f8280fda3..eb6b07ce02f 100644 --- a/spec/lib/gitlab/import_export/json/streaming_serializer_spec.rb +++ b/spec/lib/gitlab/import_export/json/streaming_serializer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::JSON::StreamingSerializer do +RSpec.describe Gitlab::ImportExport::JSON::StreamingSerializer do let_it_be(:user) { create(:user) } let_it_be(:release) { create(:release) } let_it_be(:group) { create(:group) } @@ -61,6 +61,20 @@ describe Gitlab::ImportExport::JSON::StreamingSerializer do subject.execute end + + context 'relation ordering' do + before do + create_list(:issue, 5, project: exportable) + end + + it 'orders exported issues by primary key' do + expected_issues = exportable.issues.reorder(:id).map(&:to_json) + + expect(json_writer).to receive(:write_relation_array).with(exportable_path, :issues, expected_issues) + + subject.execute + end + end end context 'with single relation' do diff --git a/spec/lib/gitlab/import_export/legacy_relation_tree_saver_spec.rb b/spec/lib/gitlab/import_export/legacy_relation_tree_saver_spec.rb index 6562aa5b8a6..454cc74b9d4 100644 --- a/spec/lib/gitlab/import_export/legacy_relation_tree_saver_spec.rb +++ b/spec/lib/gitlab/import_export/legacy_relation_tree_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::LegacyRelationTreeSaver do +RSpec.describe Gitlab::ImportExport::LegacyRelationTreeSaver do let(:exportable) { create(:group) } let(:relation_tree_saver) { described_class.new } let(:tree) { {} } diff --git a/spec/lib/gitlab/import_export/lfs_restorer_spec.rb b/spec/lib/gitlab/import_export/lfs_restorer_spec.rb index a932dc3ee4e..a9f7fb72612 100644 --- a/spec/lib/gitlab/import_export/lfs_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/lfs_restorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::LfsRestorer do +RSpec.describe Gitlab::ImportExport::LfsRestorer do include UploadHelpers let(:export_path) { "#{Dir.tmpdir}/lfs_object_restorer_spec" } diff --git a/spec/lib/gitlab/import_export/lfs_saver_spec.rb b/spec/lib/gitlab/import_export/lfs_saver_spec.rb index e9d06573e70..db76eb9538b 100644 --- a/spec/lib/gitlab/import_export/lfs_saver_spec.rb +++ b/spec/lib/gitlab/import_export/lfs_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::LfsSaver do +RSpec.describe Gitlab::ImportExport::LfsSaver do let(:shared) { project.import_export_shared } let(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" } let(:project) { create(:project) } diff --git a/spec/lib/gitlab/import_export/members_mapper_spec.rb b/spec/lib/gitlab/import_export/members_mapper_spec.rb index 61e893bfb3c..9755e322221 100644 --- a/spec/lib/gitlab/import_export/members_mapper_spec.rb +++ b/spec/lib/gitlab/import_export/members_mapper_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::MembersMapper do +RSpec.describe Gitlab::ImportExport::MembersMapper do describe 'map members' do shared_examples 'imports exported members' do let(:user) { create(:admin) } diff --git a/spec/lib/gitlab/import_export/merge_request_parser_spec.rb b/spec/lib/gitlab/import_export/merge_request_parser_spec.rb index 0cdb3c43992..c558c12f581 100644 --- a/spec/lib/gitlab/import_export/merge_request_parser_spec.rb +++ b/spec/lib/gitlab/import_export/merge_request_parser_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::MergeRequestParser do +RSpec.describe Gitlab::ImportExport::MergeRequestParser do include ProjectForksHelper let(:user) { create(:user) } diff --git a/spec/lib/gitlab/import_export/model_configuration_spec.rb b/spec/lib/gitlab/import_export/model_configuration_spec.rb index cfbfe244988..34591122a97 100644 --- a/spec/lib/gitlab/import_export/model_configuration_spec.rb +++ b/spec/lib/gitlab/import_export/model_configuration_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' # Part of the test security suite for the Import/Export feature # Finds if a new model has been added that can potentially be part of the Import/Export # If it finds a new model, it will show a +failure_message+ with the options available. -describe 'Import/Export model configuration' do +RSpec.describe 'Import/Export model configuration' do include ConfigurationHelper let(:all_models_yml) { 'spec/lib/gitlab/import_export/all_models.yml' } diff --git a/spec/lib/gitlab/import_export/project/export_task_spec.rb b/spec/lib/gitlab/import_export/project/export_task_spec.rb index dc8eb54dc14..1048379a5d6 100644 --- a/spec/lib/gitlab/import_export/project/export_task_spec.rb +++ b/spec/lib/gitlab/import_export/project/export_task_spec.rb @@ -2,7 +2,7 @@ require 'rake_helper' -describe Gitlab::ImportExport::Project::ExportTask do +RSpec.describe Gitlab::ImportExport::Project::ExportTask do let_it_be(:username) { 'root' } let(:namespace_path) { username } let_it_be(:user) { create(:user, username: username) } diff --git a/spec/lib/gitlab/import_export/project/import_task_spec.rb b/spec/lib/gitlab/import_export/project/import_task_spec.rb index 7c11161aaa7..90f4501acdc 100644 --- a/spec/lib/gitlab/import_export/project/import_task_spec.rb +++ b/spec/lib/gitlab/import_export/project/import_task_spec.rb @@ -2,7 +2,7 @@ require 'rake_helper' -describe Gitlab::ImportExport::Project::ImportTask, :request_store do +RSpec.describe Gitlab::ImportExport::Project::ImportTask, :request_store do let(:username) { 'root' } let(:namespace_path) { username } let!(:user) { create(:user, username: username) } diff --git a/spec/lib/gitlab/import_export/project/object_builder_spec.rb b/spec/lib/gitlab/import_export/project/object_builder_spec.rb index c9d1410400a..20d882c82be 100644 --- a/spec/lib/gitlab/import_export/project/object_builder_spec.rb +++ b/spec/lib/gitlab/import_export/project/object_builder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Project::ObjectBuilder do +RSpec.describe Gitlab::ImportExport::Project::ObjectBuilder do let!(:group) { create(:group, :private) } let!(:subgroup) { create(:group, :private, parent: group) } let!(:project) do diff --git a/spec/lib/gitlab/import_export/project/relation_factory_spec.rb b/spec/lib/gitlab/import_export/project/relation_factory_spec.rb index 3339129cb8f..31cf2362628 100644 --- a/spec/lib/gitlab/import_export/project/relation_factory_spec.rb +++ b/spec/lib/gitlab/import_export/project/relation_factory_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Project::RelationFactory do +RSpec.describe Gitlab::ImportExport::Project::RelationFactory do let(:group) { create(:group) } let(:project) { create(:project, :repository, group: group) } let(:members_mapper) { double('members_mapper').as_null_object } diff --git a/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb index 867dc37c5c5..6d5604dc40f 100644 --- a/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb @@ -6,7 +6,7 @@ def match_mr1_note(content_regex) MergeRequest.find_by(title: 'MR1').notes.select { |n| n.note.match(/#{content_regex}/)}.first end -describe Gitlab::ImportExport::Project::TreeRestorer do +RSpec.describe Gitlab::ImportExport::Project::TreeRestorer do include ImportExport::CommonUtil using RSpec::Parameterized::TableSyntax @@ -291,10 +291,6 @@ describe Gitlab::ImportExport::Project::TreeRestorer do expect(@project.auto_devops.deploy_strategy).to eq('continuous') end - it 'restores the correct service' do - expect(CustomIssueTrackerService.first).not_to be_nil - end - it 'restores zoom meetings' do meetings = @project.issues.first.zoom_meetings @@ -553,8 +549,7 @@ describe Gitlab::ImportExport::Project::TreeRestorer do labels: 2, label_with_priorities: 'A project label', milestones: 1, - first_issue_labels: 1, - services: 1 + first_issue_labels: 1 end context 'when there is an existing build with build token' do @@ -637,7 +632,6 @@ describe Gitlab::ImportExport::Project::TreeRestorer do label_with_priorities: 'A project label', milestones: 1, first_issue_labels: 1, - services: 1, import_failures: 1 it 'records the failures in the database' do @@ -757,18 +751,6 @@ describe Gitlab::ImportExport::Project::TreeRestorer do setup_reader(reader) end - it 'does not import any templated services' do - expect(restored_project_json).to eq(true) - - expect(project.services.where(template: true).count).to eq(0) - end - - it 'does not import any instance services' do - expect(restored_project_json).to eq(true) - - expect(project.services.where(instance: true).count).to eq(0) - end - it 'imports labels' do create(:group_label, name: 'Another label', group: project.group) @@ -972,7 +954,6 @@ describe Gitlab::ImportExport::Project::TreeRestorer do label_with_priorities: nil, milestones: 1, first_issue_labels: 0, - services: 0, import_failures: 1 it 'records the failures in the database' do diff --git a/spec/lib/gitlab/import_export/project/tree_saver_spec.rb b/spec/lib/gitlab/import_export/project/tree_saver_spec.rb index 533d1097928..40c103eeda6 100644 --- a/spec/lib/gitlab/import_export/project/tree_saver_spec.rb +++ b/spec/lib/gitlab/import_export/project/tree_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Project::TreeSaver do +RSpec.describe Gitlab::ImportExport::Project::TreeSaver do let_it_be(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" } let_it_be(:exportable_path) { 'project' } @@ -223,18 +223,6 @@ describe Gitlab::ImportExport::Project::TreeSaver do it { is_expected.not_to be_empty } end - context 'with services' do - let(:relation_name) { :services } - - it 'saves the correct service type' do - expect(subject.first['type']).to eq('CustomIssueTrackerService') - end - - it 'saves the properties for a service' do - expect(subject.first['properties']).to eq('one' => 'value') - end - end - context 'with project_feature' do let(:relation_name) { :project_feature } @@ -453,7 +441,6 @@ describe Gitlab::ImportExport::Project::TreeSaver do create(:resource_label_event, label: group_label, merge_request: merge_request) create(:event, :created, target: milestone, project: project, author: user) - create(:service, project: project, type: 'CustomIssueTrackerService', category: 'issue_tracker', properties: { one: 'value' }) create(:project_custom_attribute, project: project) create(:project_custom_attribute, project: project) diff --git a/spec/lib/gitlab/import_export/reader_spec.rb b/spec/lib/gitlab/import_export/reader_spec.rb index e37ad281eb5..8828c7ceb62 100644 --- a/spec/lib/gitlab/import_export/reader_spec.rb +++ b/spec/lib/gitlab/import_export/reader_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::Reader do +RSpec.describe Gitlab::ImportExport::Reader do let(:shared) { Gitlab::ImportExport::Shared.new(nil) } describe '#project_tree' do diff --git a/spec/lib/gitlab/import_export/references_configuration_spec.rb b/spec/lib/gitlab/import_export/references_configuration_spec.rb index 91cf9f964c0..2934d0059ee 100644 --- a/spec/lib/gitlab/import_export/references_configuration_spec.rb +++ b/spec/lib/gitlab/import_export/references_configuration_spec.rb @@ -9,7 +9,7 @@ require 'spec_helper' # or to be blacklisted by using the import_export.yml configuration file. # Likewise, new models added to import_export.yml, will need to be added with their correspondent relations # to this spec. -describe 'Import/Export Project configuration' do +RSpec.describe 'Import/Export Project configuration' do include ConfigurationHelper where(:relation_path, :relation_name) do diff --git a/spec/lib/gitlab/import_export/relation_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/relation_tree_restorer_spec.rb index 8fe419da450..ddc96b83208 100644 --- a/spec/lib/gitlab/import_export/relation_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/relation_tree_restorer_spec.rb @@ -9,7 +9,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::RelationTreeRestorer do +RSpec.describe Gitlab::ImportExport::RelationTreeRestorer do include ImportExport::CommonUtil let(:user) { create(:user) } diff --git a/spec/lib/gitlab/import_export/repo_restorer_spec.rb b/spec/lib/gitlab/import_export/repo_restorer_spec.rb index d5839589633..ace4449042e 100644 --- a/spec/lib/gitlab/import_export/repo_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/repo_restorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::RepoRestorer do +RSpec.describe Gitlab::ImportExport::RepoRestorer do include GitHelpers describe 'bundle a project Git repo' do diff --git a/spec/lib/gitlab/import_export/repo_saver_spec.rb b/spec/lib/gitlab/import_export/repo_saver_spec.rb index a95d661ec3c..73d51000c67 100644 --- a/spec/lib/gitlab/import_export/repo_saver_spec.rb +++ b/spec/lib/gitlab/import_export/repo_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::RepoSaver do +RSpec.describe Gitlab::ImportExport::RepoSaver do describe 'bundle a project Git repo' do let_it_be(:user) { create(:user) } let!(:project) { create(:project, :repository) } diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index 0d112bfdb2a..2d313b4dcad 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -461,36 +461,6 @@ DeployKey: - public - can_push - last_used_at -Service: -- id -- type -- title -- project_id -- created_at -- updated_at -- active -- properties -- template -- instance -- alert_events -- push_events -- issues_events -- commit_events -- merge_requests_events -- tag_push_events -- note_events -- pipeline_events -- job_events -- comment_on_event_enabled -- comment_detail -- category -- default -- wiki_page_events -- confidential_issues_events -- confidential_note_events -- deployment_events -- description -- inherit_from_id ProjectHook: - id - url @@ -618,6 +588,7 @@ ProtectedBranch::PushAccessLevel: - updated_at - user_id - group_id +- deploy_key_id ProtectedBranch::UnprotectAccessLevel: - id - protected_branch_id @@ -705,6 +676,7 @@ ProjectCiCdSetting: - group_runners_enabled ProjectSetting: - allow_merge_on_skipped_pipeline +- has_confluence ProtectedEnvironment: - id - project_id diff --git a/spec/lib/gitlab/import_export/saver_spec.rb b/spec/lib/gitlab/import_export/saver_spec.rb index 18e9d7da32d..865c7e57b5a 100644 --- a/spec/lib/gitlab/import_export/saver_spec.rb +++ b/spec/lib/gitlab/import_export/saver_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require 'fileutils' -describe Gitlab::ImportExport::Saver do +RSpec.describe Gitlab::ImportExport::Saver do let!(:project) { create(:project, :public, name: 'project') } let(:base_path) { "#{Dir.tmpdir}/project_tree_saver_spec" } let(:export_path) { "#{base_path}/project_tree_saver_spec/export" } diff --git a/spec/lib/gitlab/import_export/shared_spec.rb b/spec/lib/gitlab/import_export/shared_spec.rb index 8c16243576d..22f2d4c5077 100644 --- a/spec/lib/gitlab/import_export/shared_spec.rb +++ b/spec/lib/gitlab/import_export/shared_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require 'fileutils' -describe Gitlab::ImportExport::Shared do +RSpec.describe Gitlab::ImportExport::Shared do let(:project) { build(:project) } subject { project.import_export_shared } diff --git a/spec/lib/gitlab/import_export/snippet_repo_restorer_spec.rb b/spec/lib/gitlab/import_export/snippet_repo_restorer_spec.rb index 43c4b164b2d..fe934cadedd 100644 --- a/spec/lib/gitlab/import_export/snippet_repo_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/snippet_repo_restorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::SnippetRepoRestorer do +RSpec.describe Gitlab::ImportExport::SnippetRepoRestorer do let_it_be(:user) { create(:user) } let(:project) { create(:project, namespace: user.namespace) } @@ -35,6 +35,12 @@ describe Gitlab::ImportExport::SnippetRepoRestorer do end end + it 'does not call snippet update statistics service' do + expect(Snippets::UpdateStatisticsService).not_to receive(:new).with(snippet) + + restorer.restore + end + context 'when the repository creation fails' do it 'returns false' do allow_any_instance_of(Gitlab::BackgroundMigration::BackfillSnippetRepositories).to receive(:perform_by_ids).and_return(nil) @@ -66,6 +72,10 @@ describe Gitlab::ImportExport::SnippetRepoRestorer do before do expect(exporter.save).to be_truthy + + allow_next_instance_of(Snippets::RepositoryValidationService) do |instance| + allow(instance).to receive(:execute).and_return(ServiceResponse.success) + end end context 'when it is valid' do @@ -115,5 +125,19 @@ describe Gitlab::ImportExport::SnippetRepoRestorer do end end end + + it 'refreshes snippet statistics' do + expect(snippet.statistics.commit_count).to be_zero + expect(snippet.statistics.file_count).to be_zero + expect(snippet.statistics.repository_size).to be_zero + + expect(Snippets::UpdateStatisticsService).to receive(:new).with(snippet).and_call_original + + restorer.restore + + expect(snippet.statistics.commit_count).not_to be_zero + expect(snippet.statistics.file_count).not_to be_zero + expect(snippet.statistics.repository_size).not_to be_zero + end end end diff --git a/spec/lib/gitlab/import_export/snippet_repo_saver_spec.rb b/spec/lib/gitlab/import_export/snippet_repo_saver_spec.rb index 7ad1ff213a1..323ed9a746e 100644 --- a/spec/lib/gitlab/import_export/snippet_repo_saver_spec.rb +++ b/spec/lib/gitlab/import_export/snippet_repo_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::SnippetRepoSaver do +RSpec.describe Gitlab::ImportExport::SnippetRepoSaver do describe 'bundle a project Git repo' do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, namespace: user.namespace) } diff --git a/spec/lib/gitlab/import_export/snippets_repo_restorer_spec.rb b/spec/lib/gitlab/import_export/snippets_repo_restorer_spec.rb index ac73462073e..7ca365762b5 100644 --- a/spec/lib/gitlab/import_export/snippets_repo_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/snippets_repo_restorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::SnippetsRepoRestorer do +RSpec.describe Gitlab::ImportExport::SnippetsRepoRestorer do include GitHelpers describe 'bundle a snippet Git repo' do diff --git a/spec/lib/gitlab/import_export/snippets_repo_saver_spec.rb b/spec/lib/gitlab/import_export/snippets_repo_saver_spec.rb index 5332990a975..8507c46ec83 100644 --- a/spec/lib/gitlab/import_export/snippets_repo_saver_spec.rb +++ b/spec/lib/gitlab/import_export/snippets_repo_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::SnippetsRepoSaver do +RSpec.describe Gitlab::ImportExport::SnippetsRepoSaver do describe 'bundle a project Git repo' do let_it_be(:user) { create(:user) } let!(:project) { create(:project) } diff --git a/spec/lib/gitlab/import_export/uploads_manager_spec.rb b/spec/lib/gitlab/import_export/uploads_manager_spec.rb index e6d6ba840be..33ad0e12c37 100644 --- a/spec/lib/gitlab/import_export/uploads_manager_spec.rb +++ b/spec/lib/gitlab/import_export/uploads_manager_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::UploadsManager do +RSpec.describe Gitlab::ImportExport::UploadsManager do let(:shared) { project.import_export_shared } let(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" } let(:project) { create(:project) } diff --git a/spec/lib/gitlab/import_export/uploads_restorer_spec.rb b/spec/lib/gitlab/import_export/uploads_restorer_spec.rb index 077ece87b31..864fd8d72fa 100644 --- a/spec/lib/gitlab/import_export/uploads_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/uploads_restorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::UploadsRestorer do +RSpec.describe Gitlab::ImportExport::UploadsRestorer do describe 'bundle a project Git repo' do let(:export_path) { "#{Dir.tmpdir}/uploads_saver_spec" } let(:shared) { project.import_export_shared } diff --git a/spec/lib/gitlab/import_export/uploads_saver_spec.rb b/spec/lib/gitlab/import_export/uploads_saver_spec.rb index 8a36caef316..8e9be209f89 100644 --- a/spec/lib/gitlab/import_export/uploads_saver_spec.rb +++ b/spec/lib/gitlab/import_export/uploads_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::UploadsSaver do +RSpec.describe Gitlab::ImportExport::UploadsSaver do describe 'bundle a project Git repo' do let(:export_path) { "#{Dir.tmpdir}/uploads_saver_spec" } let(:file) { fixture_file_upload('spec/fixtures/banana_sample.gif', 'image/gif') } diff --git a/spec/lib/gitlab/import_export/version_checker_spec.rb b/spec/lib/gitlab/import_export/version_checker_spec.rb index befbd1b4c19..8b39330656f 100644 --- a/spec/lib/gitlab/import_export/version_checker_spec.rb +++ b/spec/lib/gitlab/import_export/version_checker_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' include ImportExport::CommonUtil -describe Gitlab::ImportExport::VersionChecker do +RSpec.describe Gitlab::ImportExport::VersionChecker do let!(:shared) { Gitlab::ImportExport::Shared.new(nil) } describe 'bundle a project Git repo' do diff --git a/spec/lib/gitlab/import_export/wiki_repo_saver_spec.rb b/spec/lib/gitlab/import_export/wiki_repo_saver_spec.rb index 264272d2026..778d0859bf1 100644 --- a/spec/lib/gitlab/import_export/wiki_repo_saver_spec.rb +++ b/spec/lib/gitlab/import_export/wiki_repo_saver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::WikiRepoSaver do +RSpec.describe Gitlab::ImportExport::WikiRepoSaver do describe 'bundle a wiki Git repo' do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :wiki_repo) } diff --git a/spec/lib/gitlab/import_export/wiki_restorer_spec.rb b/spec/lib/gitlab/import_export/wiki_restorer_spec.rb index 33cd3e55393..6c80c410d07 100644 --- a/spec/lib/gitlab/import_export/wiki_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/wiki_restorer_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Gitlab::ImportExport::WikiRestorer do +RSpec.describe Gitlab::ImportExport::WikiRestorer do describe 'restore a wiki Git repo' do let!(:project_with_wiki) { create(:project, :wiki_repo) } let!(:project_without_wiki) { create(:project) } |