summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-20 09:40:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-20 09:40:42 +0000
commitee664acb356f8123f4f6b00b73c1e1cf0866c7fb (patch)
treef8479f94a28f66654c6a4f6fb99bad6b4e86a40e /spec/lib/gitlab/import_export/project/tree_restorer_spec.rb
parent62f7d5c5b69180e82ae8196b7b429eeffc8e7b4f (diff)
downloadgitlab-ce-15.5.0-rc42.tar.gz
Add latest changes from gitlab-org/gitlab@15-5-stable-eev15.5.0-rc42
Diffstat (limited to 'spec/lib/gitlab/import_export/project/tree_restorer_spec.rb')
-rw-r--r--spec/lib/gitlab/import_export/project/tree_restorer_spec.rb23
1 files changed, 16 insertions, 7 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 299e107c881..fae94a3b544 100644
--- a/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/project/tree_restorer_spec.rb
@@ -140,13 +140,13 @@ RSpec.describe Gitlab::ImportExport::Project::TreeRestorer do
it 'restores pipelines based on ascending id order' do
expected_ordered_shas = %w[
- 2ea1f3dec713d940208fb5ce4a38765ecb5d3f73
- ce84140e8b878ce6e7c4d298c7202ff38170e3ac
- 048721d90c449b244b7b4c53a9186b04330174ec
- sha-notes
- 5f923865dde3436854e9ceb9cdb7815618d4e849
- d2d430676773caa88cdaf7c55944073b2fd5561a
- 2ea1f3dec713d940208fb5ce4a38765ecb5d3f73
+ 2ea1f3dec713d940208fb5ce4a38765ecb5d3f73
+ ce84140e8b878ce6e7c4d298c7202ff38170e3ac
+ 048721d90c449b244b7b4c53a9186b04330174ec
+ sha-notes
+ 5f923865dde3436854e9ceb9cdb7815618d4e849
+ d2d430676773caa88cdaf7c55944073b2fd5561a
+ 2ea1f3dec713d940208fb5ce4a38765ecb5d3f73
]
project = Project.find_by_path('project')
@@ -156,6 +156,15 @@ RSpec.describe Gitlab::ImportExport::Project::TreeRestorer do
end
end
+ it 'restores pipeline metadata' do
+ pipeline = Ci::Pipeline.find_by_sha('sha-notes')
+ pipeline_metadata = pipeline.pipeline_metadata
+
+ expect(pipeline_metadata.title).to eq('Build pipeline')
+ expect(pipeline_metadata.pipeline_id).to eq(pipeline.id)
+ expect(pipeline_metadata.project_id).to eq(pipeline.project_id)
+ end
+
it 'preserves updated_at on issues' do
issue = Issue.find_by(description: 'Aliquam enim illo et possimus.')