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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-03 00:06:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-03 00:06:51 +0300
commita19a376bf35b2009566e86b8190662c21ed7e2ba (patch)
tree46d3ea7f44a0a732b96fcbae0cf09d3cfd8ec9dc /spec/tasks
parent556c79d6cc3d7b24ecbba3a79f8432eb3fcf5c7e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tasks')
-rw-r--r--spec/tasks/gitlab/import_export/import_rake_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/tasks/gitlab/import_export/import_rake_spec.rb b/spec/tasks/gitlab/import_export/import_rake_spec.rb
index e8507e63bf5..18b89912b9f 100644
--- a/spec/tasks/gitlab/import_export/import_rake_spec.rb
+++ b/spec/tasks/gitlab/import_export/import_rake_spec.rb
@@ -2,7 +2,7 @@
require 'rake_helper'
-describe 'gitlab:import_export:import rake task' do
+describe 'gitlab:import_export:import rake task', :sidekiq do
let(:username) { 'root' }
let(:namespace_path) { username }
let!(:user) { create(:user, username: username) }
@@ -12,6 +12,8 @@ describe 'gitlab:import_export:import rake task' do
before do
Rake.application.rake_require('tasks/gitlab/import_export/import')
allow(Settings.uploads.object_store).to receive(:[]=).and_call_original
+ allow_any_instance_of(GitlabProjectImport).to receive(:exit)
+ .and_raise(RuntimeError, 'exit not handled')
end
around do |example|
@@ -95,6 +97,10 @@ describe 'gitlab:import_export:import rake task' do
end
it 'fails project import with an error' do
+ # Catch exit call, and raise exception instead
+ expect_any_instance_of(GitlabProjectImport).to receive(:exit)
+ .with(1).and_raise(SystemExit)
+
expect { subject }.to raise_error(SystemExit).and output(error).to_stdout
expect(project.merge_requests).to be_empty