This instance was upgraded to Heptapod 0.27.2 on 2021-12-08 at 22:00 UTC+1

Commit e13af4a0 authored by James Lopez's avatar James Lopez
Browse files

add spec

parent 5347c76d0023
......@@ -569,6 +569,7 @@ def add_import_job
forked_from_project.repository_storage_path,
forked_from_project.disk_path)
elsif gitlab_project_import?
# Do not retry on Import/Export until https://gitlab.com/gitlab-org/gitlab-ce/issues/26189 is solved.
RepositoryImportWorker.set(retry: false).perform_async(self.id)
else
RepositoryImportWorker.perform_async(self.id)
......
......@@ -21,7 +21,6 @@ def perform(project_id)
return if service.async?
if result[:status] == :error
fail_import(project, result[:message]) if project.gitlab_project_import?
raise result[:message]
......
......@@ -52,6 +52,19 @@
end.to raise_error(StandardError, error)
expect(project.reload.import_jid).not_to be_nil
end
it 'updates the error on Import/Export' do
error = %q{remote: Not Found fatal: repository 'https://user:pass@test.com/root/repoC.git/' not found }
project.update_attributes(import_jid: '123', import_type: 'gitlab_project')
expect_any_instance_of(Projects::ImportService).to receive(:execute).and_return({ status: :error, message: error })
expect do
subject.perform(project.id)
end.to raise_error(StandardError, error)
expect(project.reload.import_error).not_to be_nil
end
end
context 'when using an asynchronous importer' do
......
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