Commit e12b81ad authored by James Lopez's avatar James Lopez

update EE files to remove old storage logic

parent 29953ced
......@@ -28,16 +28,12 @@ module EE
::RepositoryImportWorker.new.perform(export_into_project_id)
ensure
export_file.close if export_file.respond_to?(:close)
project.remove_exported_project_file
project.remove_exports
end
def export_file
strong_memoize(:export_file) do
if object_storage?
project.import_export_upload.export_file&.file
else
File.open(project.export_project_path)
end
project.import_export_upload.export_file&.file
end
end
......
......@@ -71,23 +71,8 @@ describe ProjectsController do
stub_ee_application_setting(custom_project_templates_group_id: group.id)
end
context 'old upload' do
before do
stub_feature_flags(import_export_object_storage: false)
end
it 'creates the project from project template' do
post :create, project: templates_params
created_project = Project.find_by_path('foo')
expect(flash[:notice]).to eq "Project 'foo' was successfully created."
expect(created_project.repository.empty?).to be false
end
end
context 'object storage' do
before do
stub_feature_flags(import_export_object_storage: true)
stub_uploads_object_storage(FileUploader)
end
......
......@@ -42,7 +42,7 @@ describe EE::Gitlab::ImportExport::AfterExportStrategies::CustomTemplateExportIm
end
it 'removes the exported project file after the import' do
expect(project_template).to receive(:remove_exported_project_file)
expect(project_template).to receive(:remove_exports)
subject.execute(user, project_template)
end
......
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