Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/bulk_imports/lfs_objects_export_service_spec.rb')
-rw-r--r--spec/services/bulk_imports/lfs_objects_export_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/bulk_imports/lfs_objects_export_service_spec.rb b/spec/services/bulk_imports/lfs_objects_export_service_spec.rb
index 5ae54ed309b..894789c7941 100644
--- a/spec/services/bulk_imports/lfs_objects_export_service_spec.rb
+++ b/spec/services/bulk_imports/lfs_objects_export_service_spec.rb
@@ -53,6 +53,18 @@ RSpec.describe BulkImports::LfsObjectsExportService do
)
end
+ context 'when lfs object has file on disk missing' do
+ it 'does not attempt to copy non-existent file' do
+ FileUtils.rm(lfs_object.file.path)
+
+ expect(service).not_to receive(:copy_files)
+
+ service.execute
+
+ expect(File).not_to exist(File.join(export_path, lfs_object.oid))
+ end
+ end
+
context 'when lfs object is remotely stored' do
let(:lfs_object) { create(:lfs_object, :object_storage) }