Commit fa2e3162 authored by James Lopez's avatar James Lopez

added changelog, small refactor

parent 3c31de75
---
title: Add uploader support to Import/Export uploads
merge_request: 20484
author:
type: added
...@@ -47,11 +47,10 @@ module Gitlab ...@@ -47,11 +47,10 @@ module Gitlab
def copy_from_object_storage def copy_from_object_storage
return unless Gitlab::ImportExport.object_storage? return unless Gitlab::ImportExport.object_storage?
return if uploads.empty?
uploads.each do |upload_model| uploads.each do |upload_model|
next unless upload_model.file next unless upload_model.file
next if upload_model.upload.local? # Already copied next if upload_model.upload.local? # Already copied, using the old method
download_and_copy(upload_model) download_and_copy(upload_model)
end end
......
...@@ -19,8 +19,6 @@ describe Gitlab::ImportExport::AvatarSaver do ...@@ -19,8 +19,6 @@ describe Gitlab::ImportExport::AvatarSaver do
it 'saves a project avatar' do it 'saves a project avatar' do
described_class.new(project: project_with_avatar, shared: shared).save described_class.new(project: project_with_avatar, shared: shared).save
puts "#{shared.export_path}/avatar/dk.png"
expect(File).to exist("#{shared.export_path}/avatar/dk.png") expect(File).to exist("#{shared.export_path}/avatar/dk.png")
end end
......
...@@ -34,8 +34,6 @@ describe Gitlab::ImportExport::UploadsManager do ...@@ -34,8 +34,6 @@ describe Gitlab::ImportExport::UploadsManager do
it 'copies the file in the correct location when there is an upload' do it 'copies the file in the correct location when there is an upload' do
manager.save manager.save
puts exported_file_path
expect(File).to exist(exported_file_path) expect(File).to exist(exported_file_path)
end end
end 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