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:
authorJames Lopez <james@jameslopez.es>2018-01-26 13:14:54 +0300
committerJames Lopez <james@jameslopez.es>2018-01-26 17:26:26 +0300
commit7affc2311282a032722af245abb92f0bd2da8db9 (patch)
tree009e6dd2be7aaa8b72ca9c999c61de975e130ef0 /spec/workers/repository_import_worker_spec.rb
parent865bb64a06f33b1076d1b9a202cd41c7ad0728c5 (diff)
add spec
Diffstat (limited to 'spec/workers/repository_import_worker_spec.rb')
-rw-r--r--spec/workers/repository_import_worker_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/workers/repository_import_worker_spec.rb b/spec/workers/repository_import_worker_spec.rb
index 7274a9f00f9..b8bdc049482 100644
--- a/spec/workers/repository_import_worker_spec.rb
+++ b/spec/workers/repository_import_worker_spec.rb
@@ -52,6 +52,19 @@ describe RepositoryImportWorker do
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