Skip to content
Snippets Groups Projects
Commit b79ebe40 authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch 'sh-fix-github-lfs-import' into 'master'

Fix import of LFS files in GitHub import

See merge request !48722
parents fe826fc3 85920e7c
No related branches found
No related tags found
1 merge request!48722Fix import of LFS files in GitHub import
Pipeline #222859234 failed
---
title: Fix import of LFS files in GitHub import
merge_request: 48722
author:
type: fixed
......@@ -23,7 +23,7 @@ def collection_method
end
def each_object_to_import
lfs_objects = Projects::LfsPointers::LfsImportService.new(project).execute
lfs_objects = Projects::LfsPointers::LfsObjectDownloadListService.new(project).execute
lfs_objects.each do |object|
yield object
......
......@@ -56,9 +56,9 @@
importer = described_class.new(project, client, parallel: false)
lfs_object_importer = double(:lfs_object_importer)
allow(importer)
.to receive(:each_object_to_import)
.and_yield(lfs_download_object)
expect_next_instance_of(Projects::LfsPointers::LfsObjectDownloadListService) do |service|
expect(service).to receive(:execute).and_return([lfs_download_object])
end
expect(Gitlab::GithubImport::Importer::LfsObjectImporter)
.to receive(:new)
......@@ -79,9 +79,9 @@
it 'imports each lfs object in parallel' do
importer = described_class.new(project, client)
allow(importer)
.to receive(:each_object_to_import)
.and_yield(lfs_download_object)
expect_next_instance_of(Projects::LfsPointers::LfsObjectDownloadListService) do |service|
expect(service).to receive(:execute).and_return([lfs_download_object])
end
expect(Gitlab::GithubImport::ImportLfsObjectWorker)
.to receive(:perform_async)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment