diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-03 18:08:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-03 18:08:08 +0300 |
commit | 946771d0b016ae92b15a60bc3290a33b94191ffe (patch) | |
tree | 64862c2433989483f5fce45d5539242577a362eb /spec/lib/gitlab/import_export | |
parent | f1e2fca19a90a6992c2020cf8c2159cfb0b61bca (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/import_export')
-rw-r--r-- | spec/lib/gitlab/import_export/project/tree_restorer_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
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 312bbb58a28..a46c6579670 100644 --- a/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb @@ -426,6 +426,10 @@ describe Gitlab::ImportExport::Project::TreeRestorer do expect(pipeline_with_external_pr.external_pull_request).to be_persisted end + + it 'has no import failures' do + expect(@project.import_failures.size).to eq 0 + end end end end @@ -499,6 +503,30 @@ describe Gitlab::ImportExport::Project::TreeRestorer do end end + context 'multiple pipelines reference the same external pull request' do + before do + setup_import_export_config('multi_pipeline_ref_one_external_pr') + expect(restored_project_json).to eq(true) + end + + it_behaves_like 'restores project successfully', + issues: 0, + labels: 0, + milestones: 0, + ci_pipelines: 2, + external_pull_requests: 1, + import_failures: 0 + + it 'restores external pull request for the restored pipelines' do + external_pr = project.external_pull_requests.first + + project.ci_pipelines.each do |pipeline_with_external_pr| + expect(pipeline_with_external_pr.external_pull_request).to be_persisted + expect(pipeline_with_external_pr.external_pull_request).to eq(external_pr) + end + end + end + context 'when post import action throw non-retriable exception' do let(:exception) { StandardError.new('post_import_error') } |