Commit b79ebe40 authored by Stan Hu's avatar Stan Hu

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

Fix import of LFS files in GitHub import

See merge request gitlab-org/gitlab!48722
parents fe826fc3 85920e7c
---
title: Fix import of LFS files in GitHub import
merge_request: 48722
author:
type: fixed
......@@ -23,7 +23,7 @@ module Gitlab
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 @@ RSpec.describe Gitlab::GithubImport::Importer::LfsObjectsImporter do
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 @@ RSpec.describe Gitlab::GithubImport::Importer::LfsObjectsImporter do
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)
......
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