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
b245e198
Commit
b245e198
authored
Feb 26, 2020
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement review feedback
parent
120f5fc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
spec/requests/api/runner_spec.rb
spec/requests/api/runner_spec.rb
+3
-2
spec/services/ci/create_job_artifacts_service_spec.rb
spec/services/ci/create_job_artifacts_service_spec.rb
+12
-6
No files found.
spec/requests/api/runner_spec.rb
View file @
b245e198
...
...
@@ -1983,8 +1983,9 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
let
(
:params
)
{
{
artifact_type: :archive
,
artifact_format: :zip
}
}
it
'does not store artifacts'
do
allow_any_instance_of
(
JobArtifactUploader
)
.
to
receive
(
:store!
).
and_raise
(
Errno
::
EIO
)
allow_next_instance_of
(
JobArtifactUploader
)
do
|
uploader
|
allow
(
uploader
).
to
receive
(
:store!
).
and_raise
(
Errno
::
EIO
)
end
upload_artifacts
(
file_upload
,
headers_with_token
,
params
)
...
...
spec/services/ci/create_job_artifacts_service_spec.rb
View file @
b245e198
...
...
@@ -121,10 +121,11 @@ describe Ci::CreateJobArtifactsService do
end
end
shared_examples
'
object storage
'
do
|
klass
,
message
,
expected_message
|
shared_examples
'
rescues object storage error
'
do
|
klass
,
message
,
expected_message
|
it
"handles
#{
klass
}
"
do
allow_any_instance_of
(
JobArtifactUploader
)
.
to
receive
(
:store!
).
and_raise
(
klass
,
message
)
allow_next_instance_of
(
JobArtifactUploader
)
do
|
uploader
|
allow
(
uploader
).
to
receive
(
:store!
).
and_raise
(
klass
,
message
)
end
expect
(
Gitlab
::
ErrorTracking
)
.
to
receive
(
:track_exception
)
...
...
@@ -138,8 +139,13 @@ describe Ci::CreateJobArtifactsService do
end
end
it_behaves_like
'object storage'
,
Errno
::
EIO
,
'some/path'
,
'Input/output error - some/path'
it_behaves_like
'object storage'
,
Google
::
Apis
::
ServerError
,
'Server error'
it_behaves_like
'object storage'
,
Signet
::
RemoteServerError
,
'The service is currently unavailable'
it_behaves_like
'rescues object storage error'
,
Errno
::
EIO
,
'some/path'
,
'Input/output error - some/path'
it_behaves_like
'rescues object storage error'
,
Google
::
Apis
::
ServerError
,
'Server error'
it_behaves_like
'rescues object storage error'
,
Signet
::
RemoteServerError
,
'The service is currently unavailable'
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