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
683cffed
Commit
683cffed
authored
Jan 18, 2020
by
Qingyu Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec issues per review comment
parent
73afd158
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
13 deletions
+2
-13
spec/lib/gitlab/import_export/import_failure_service_spec.rb
spec/lib/gitlab/import_export/import_failure_service_spec.rb
+1
-12
spec/models/import_failure_spec.rb
spec/models/import_failure_spec.rb
+1
-1
No files found.
spec/lib/gitlab/import_export/import_failure_service_spec.rb
View file @
683cffed
...
...
@@ -55,23 +55,12 @@ describe Gitlab::ImportExport::ImportFailureService do
with_them
do
context
'when retry succeeds'
do
before
do
response_values
=
[
:raise
,
true
]
allow
(
label
).
to
receive
(
:save!
).
exactly
(
2
).
times
do
value
=
response_values
.
shift
value
==
:raise
?
raise
(
exception
)
:
value
end
end
it
'retries 1 time'
do
expect
(
label
).
to
receive
(
:save!
).
and_raise
(
exception
.
new
)
expect
(
label
).
to
receive
(
:save!
).
and_return
(
true
)
perform_retry
end
it
'retries and logs import failure once with correct params'
do
expect
(
subject
).
to
receive
(
:log_import_failure
).
with
(
relation_key
,
relation_index
,
instance_of
(
exception
),
1
)
expect
(
subject
).
to
receive
(
:log_import_failure
).
with
(
relation_key
,
relation_index
,
instance_of
(
exception
),
1
)
.
once
perform_retry
end
...
...
spec/models/import_failure_spec.rb
View file @
683cffed
...
...
@@ -22,7 +22,7 @@ describe ImportFailure do
allow
(
subject
).
to
receive
(
:project
).
and_return
(
nil
)
end
it
{
is_expected
.
to
validate_presence_of
(
:
project
)
}
it
{
is_expected
.
to
validate_presence_of
(
:
group
)
}
end
end
end
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