Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0d73e307
Commit
0d73e307
authored
Dec 02, 2019
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not exit from `import.rake`
This stubs `exit 1` call to raise exception always.
parent
f9eb72d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
spec/tasks/gitlab/import_export/import_rake_spec.rb
spec/tasks/gitlab/import_export/import_rake_spec.rb
+6
-0
No files found.
spec/tasks/gitlab/import_export/import_rake_spec.rb
View file @
0d73e307
...
...
@@ -12,6 +12,8 @@ describe 'gitlab:import_export:import rake task', :sidekiq 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', :sidekiq 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment