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
31bbacf7
Commit
31bbacf7
authored
Mar 30, 2020
by
Alan Paruszewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set 202 status for running Vulnerability Exports
parent
666755d6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
ee/changelogs/unreleased/197494-set-accepted-status-code-when-export-is-generating.yml
...94-set-accepted-status-code-when-export-is-generating.yml
+6
-0
ee/lib/api/vulnerability_exports.rb
ee/lib/api/vulnerability_exports.rb
+4
-1
ee/spec/requests/api/vulnerability_exports_spec.rb
ee/spec/requests/api/vulnerability_exports_spec.rb
+1
-1
No files found.
ee/changelogs/unreleased/197494-set-accepted-status-code-when-export-is-generating.yml
0 → 100644
View file @
31bbacf7
---
title
:
Return 202 Accepted status code when fetching incompleted Vulnerability Export
from API
merge_request
:
28314
author
:
type
:
changed
ee/lib/api/vulnerability_exports.rb
View file @
31bbacf7
...
...
@@ -55,7 +55,10 @@ module API
get
':id/vulnerability_exports/:export_id'
do
authorize!
:read_vulnerability_export
,
vulnerability_export
::
Gitlab
::
PollingInterval
.
set_api_header
(
self
,
interval:
5_000
)
unless
vulnerability_export
.
completed?
unless
vulnerability_export
.
completed?
::
Gitlab
::
PollingInterval
.
set_api_header
(
self
,
interval:
5_000
)
status
:accepted
end
present
vulnerability_export
,
with:
EE
::
API
::
Entities
::
VulnerabilityExport
...
...
ee/spec/requests/api/vulnerability_exports_spec.rb
View file @
31bbacf7
...
...
@@ -105,7 +105,7 @@ describe API::VulnerabilityExports do
it
'returns information about vulnerability export'
do
get_vulnerability_export
expect
(
response
).
to
have_gitlab_http_status
(
:
ok
)
expect
(
response
).
to
have_gitlab_http_status
(
:
accepted
)
expect
(
response
).
to
match_response_schema
(
'public_api/v4/vulnerability_export'
,
dir:
'ee'
)
expect
(
json_response
[
'id'
]).
to
eq
vulnerability_export
.
id
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