Unverified Commit 401a3bca authored by James Lopez's avatar James Lopez
Browse files

Fix import_jid error on project import

parent 1322146b
---
title: Fix import_jid error on project import
merge_request: 25239
author:
type: fixed
...@@ -61,7 +61,7 @@ def log_debug(details) ...@@ -61,7 +61,7 @@ def log_debug(details)
def log_base_data def log_base_data
{ {
importer: 'Import/Export', importer: 'Import/Export',
import_jid: @project&.import_state&.import_jid, import_jid: @project&.import_state&.jid,
project_id: @project&.id, project_id: @project&.id,
project_path: @project&.full_path project_path: @project&.full_path
} }
......
...@@ -14,6 +14,16 @@ ...@@ -14,6 +14,16 @@
expect(subject.errors).to eq(['Error importing into [FILTERED] Permission denied @ unlink_internal - [FILTERED]']) expect(subject.errors).to eq(['Error importing into [FILTERED] Permission denied @ unlink_internal - [FILTERED]'])
end end
it 'updates the import JID' do
import_state = create(:import_state, project: project, jid: 'jid-test')
expect_next_instance_of(Gitlab::Import::Logger) do |logger|
expect(logger).to receive(:error).with(hash_including(import_jid: import_state.jid))
end
subject.error(error)
end
it 'calls the error logger with the full message' do it 'calls the error logger with the full message' do
expect(subject).to receive(:log_error).with(hash_including(message: error.message)) expect(subject).to receive(:log_error).with(hash_including(message: error.message))
......
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