Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/import_export')
-rw-r--r--spec/lib/gitlab/import_export/all_models.yml7
-rw-r--r--spec/lib/gitlab/import_export/lfs_saver_spec.rb12
-rw-r--r--spec/lib/gitlab/import_export/safe_model_attributes.yml5
3 files changed, 24 insertions, 0 deletions
diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml
index 1546b6a26c8..9d516c8d7ac 100644
--- a/spec/lib/gitlab/import_export/all_models.yml
+++ b/spec/lib/gitlab/import_export/all_models.yml
@@ -65,6 +65,7 @@ issues:
- customer_relations_contacts
- issue_customer_relations_contacts
- email
+- issuable_resource_links
work_item_type:
- issues
events:
@@ -274,6 +275,7 @@ ci_pipelines:
- security_findings
- daily_build_group_report_results
- latest_builds
+- latest_successful_builds
- daily_report_results
- latest_builds_report_results
- messages
@@ -336,6 +338,8 @@ integrations:
- jira_tracker_data
- zentao_tracker_data
- issue_tracker_data
+# dingtalk_tracker_data JiHu-specific, see https://jihulab.com/gitlab-cn/gitlab/-/merge_requests/417
+- dingtalk_tracker_data
hooks:
- project
- web_hook_logs
@@ -414,6 +418,8 @@ project:
- pushover_integration
- jira_integration
- zentao_integration
+# dingtalk_integration JiHu-specific, see https://jihulab.com/gitlab-cn/gitlab/-/merge_requests/417
+- dingtalk_integration
- redmine_integration
- youtrack_integration
- custom_issue_tracker_integration
@@ -613,6 +619,7 @@ project:
- secure_files
- security_trainings
- vulnerability_reads
+- build_artifacts_size_refresh
award_emoji:
- awardable
- user
diff --git a/spec/lib/gitlab/import_export/lfs_saver_spec.rb b/spec/lib/gitlab/import_export/lfs_saver_spec.rb
index 84bd782c467..aa456736f78 100644
--- a/spec/lib/gitlab/import_export/lfs_saver_spec.rb
+++ b/spec/lib/gitlab/import_export/lfs_saver_spec.rb
@@ -45,6 +45,18 @@ RSpec.describe Gitlab::ImportExport::LfsSaver do
expect(File).to exist("#{shared.export_path}/lfs-objects/#{lfs_object.oid}")
end
+ context 'when lfs object has file on disk missing' do
+ it 'does not attempt to copy non-existent file' do
+ FileUtils.rm(lfs_object.file.path)
+ expect(saver).not_to receive(:copy_files)
+
+ saver.save # rubocop:disable Rails/SaveBang
+
+ expect(shared.errors).to be_empty
+ expect(File).not_to exist("#{shared.export_path}/lfs-objects/#{lfs_object.oid}")
+ end
+ end
+
describe 'saving a json file' do
before do
# Create two more LfsObjectProject records with different `repository_type`s
diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml
index e06fcb0cd3f..d7f07a1eadf 100644
--- a/spec/lib/gitlab/import_export/safe_model_attributes.yml
+++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml
@@ -585,6 +585,7 @@ ProjectFeature:
- operations_access_level
- security_and_compliance_access_level
- container_registry_access_level
+- package_registry_access_level
- created_at
- updated_at
ProtectedBranch::MergeAccessLevel:
@@ -858,6 +859,10 @@ Epic:
- external_key
- confidential
- color
+ - total_opened_issue_weight
+ - total_closed_issue_weight
+ - total_opened_issue_count
+ - total_closed_issue_count
EpicIssue:
- id
- relative_position