Commit e7757486 authored by Simon Knox's avatar Simon Knox Committed by Jose Ivan Vargas

resolve conflicts from 4c7449e4

parent 4c7449e4
...@@ -12,9 +12,6 @@ class Import::GitlabProjectsController < Import::BaseController ...@@ -12,9 +12,6 @@ class Import::GitlabProjectsController < Import::BaseController
return redirect_back_or_default(options: { alert: "You need to upload a GitLab project export archive." }) return redirect_back_or_default(options: { alert: "You need to upload a GitLab project export archive." })
end end
<<<<<<< HEAD
@project = ::Projects::GitlabProjectsImportService.new(current_user, project_params).execute
=======
import_upload_path = Gitlab::ImportExport.import_upload_path(filename: tmp_filename) import_upload_path = Gitlab::ImportExport.import_upload_path(filename: tmp_filename)
FileUtils.mkdir_p(File.dirname(import_upload_path)) FileUtils.mkdir_p(File.dirname(import_upload_path))
...@@ -24,7 +21,6 @@ class Import::GitlabProjectsController < Import::BaseController ...@@ -24,7 +21,6 @@ class Import::GitlabProjectsController < Import::BaseController
current_user, current_user,
import_upload_path, import_upload_path,
project_params[:path]).execute project_params[:path]).execute
>>>>>>> 04a0f226c4... Merge branch 'race-condition-in-project-uploads-fix-9-4' into 'security-9-4'
if @project.saved? if @project.saved?
redirect_to( redirect_to(
......
...@@ -30,17 +30,9 @@ feature 'Import/Export - project import integration test', js: true do ...@@ -30,17 +30,9 @@ feature 'Import/Export - project import integration test', js: true do
expect(page).to have_content('Import an exported GitLab project') expect(page).to have_content('Import an exported GitLab project')
expect(URI.parse(current_url).query).to eq("namespace_id=#{namespace.id}&path=test-project-path") expect(URI.parse(current_url).query).to eq("namespace_id=#{namespace.id}&path=test-project-path")
expect(Gitlab::ImportExport).to receive(:import_upload_path).with(filename: /\A\h{32}_test-project-path\z/).and_call_original
<<<<<<< HEAD
attach_file('file', file)
=======
expect(page).to have_content('GitLab project export')
expect(URI.parse(current_url).query).to eq("namespace_id=#{namespace.id}&path=test-project-path")
expect(Gitlab::ImportExport).to receive(:import_upload_path).with(filename: /\A[0-9a-f]{32}_test_project_export\.tar\.gz\z/).and_call_original expect(Gitlab::ImportExport).to receive(:import_upload_path).with(filename: /\A[0-9a-f]{32}_test_project_export\.tar\.gz\z/).and_call_original
attach_file('file', file) attach_file('file', file)
>>>>>>> 04a0f226c4... Merge branch 'race-condition-in-project-uploads-fix-9-4' into 'security-9-4'
expect { click_on 'Import project' }.to change { Project.count }.by(1) expect { click_on 'Import project' }.to change { Project.count }.by(1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment