From 6691194af979d87b9afca7c053af438c904f4af9 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 24 Sep 2018 12:02:43 +0200 Subject: [PATCH] Add changelog. Add more specs. --- ...com-unable-to-import-a-project-that-was-just-exported.yml | 5 +++++ spec/lib/gitlab/import_export/project.json | 1 + spec/lib/gitlab/import_export/project_tree_restorer_spec.rb | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 changelogs/unreleased/51747-gitlab-com-unable-to-import-a-project-that-was-just-exported.yml diff --git a/changelogs/unreleased/51747-gitlab-com-unable-to-import-a-project-that-was-just-exported.yml b/changelogs/unreleased/51747-gitlab-com-unable-to-import-a-project-that-was-just-exported.yml new file mode 100644 index 00000000000..29f7fd872bc --- /dev/null +++ b/changelogs/unreleased/51747-gitlab-com-unable-to-import-a-project-that-was-just-exported.yml @@ -0,0 +1,5 @@ +--- +title: Fix NULL pipeline import problem and pipeline user mapping issue +merge_request: 21875 +author: +type: fixed diff --git a/spec/lib/gitlab/import_export/project.json b/spec/lib/gitlab/import_export/project.json index 06e0449205d..3f2281f213f 100644 --- a/spec/lib/gitlab/import_export/project.json +++ b/spec/lib/gitlab/import_export/project.json @@ -6154,6 +6154,7 @@ "status": "failed", "started_at": null, "finished_at": null, + "user_id": 9999, "duration": null, "notes": [ { 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 d44cfc6cc8f..7ebfc61f5e7 100644 --- a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb @@ -62,6 +62,10 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do expect(Ci::Pipeline.find_by_sha('sha-notes').notes).not_to be_empty end + it 'pipeline has the correct user ID' do + expect(Ci::Pipeline.find_by_sha('sha-notes').user_id).to eq(@user.id) + end + it 'restores pipelines with missing ref' do expect(Ci::Pipeline.where(ref: nil)).not_to be_empty end