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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
2b8005ae
Commit
2b8005ae
authored
Feb 27, 2017
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New runner API returns 204
parent
7d60876b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
lib/api/runner.rb
lib/api/runner.rb
+1
-1
spec/requests/api/runner_spec.rb
spec/requests/api/runner_spec.rb
+4
-1
No files found.
lib/api/runner.rb
View file @
2b8005ae
...
@@ -38,7 +38,7 @@ module API
...
@@ -38,7 +38,7 @@ module API
end
end
desc
'Deletes a registered Runner'
do
desc
'Deletes a registered Runner'
do
http_codes
[[
20
0
,
'Runner was deleted'
],
[
403
,
'Forbidden'
]]
http_codes
[[
20
4
,
'Runner was deleted'
],
[
403
,
'Forbidden'
]]
end
end
params
do
params
do
requires
:token
,
type:
String
,
desc:
%q(Runner's authentication token)
requires
:token
,
type:
String
,
desc:
%q(Runner's authentication token)
...
...
spec/requests/api/runner_spec.rb
View file @
2b8005ae
...
@@ -123,6 +123,7 @@ describe API::Runner do
...
@@ -123,6 +123,7 @@ describe API::Runner do
context
'when no token is provided'
do
context
'when no token is provided'
do
it
'returns 400 error'
do
it
'returns 400 error'
do
delete
api
(
'/runners'
)
delete
api
(
'/runners'
)
expect
(
response
).
to
have_http_status
400
expect
(
response
).
to
have_http_status
400
end
end
end
end
...
@@ -130,6 +131,7 @@ describe API::Runner do
...
@@ -130,6 +131,7 @@ describe API::Runner do
context
'when invalid token is provided'
do
context
'when invalid token is provided'
do
it
'returns 403 error'
do
it
'returns 403 error'
do
delete
api
(
'/runners'
),
token:
'invalid'
delete
api
(
'/runners'
),
token:
'invalid'
expect
(
response
).
to
have_http_status
403
expect
(
response
).
to
have_http_status
403
end
end
end
end
...
@@ -139,7 +141,8 @@ describe API::Runner do
...
@@ -139,7 +141,8 @@ describe API::Runner do
it
'deletes Runner'
do
it
'deletes Runner'
do
delete
api
(
'/runners'
),
token:
runner
.
token
delete
api
(
'/runners'
),
token:
runner
.
token
expect
(
response
).
to
have_http_status
200
expect
(
response
).
to
have_http_status
204
expect
(
Ci
::
Runner
.
count
).
to
eq
(
0
)
expect
(
Ci
::
Runner
.
count
).
to
eq
(
0
)
end
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