Merge branch 'feature-expose-runner-ip-to-api' into 'master'

Expose runner ip address to runners API

Closes #46102

See merge request gitlab-org/gitlab-ce!18799
This commit is contained in:
Kamil Trzciński 2018-05-08 08:14:35 +00:00
commit a0920df291
3 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
title: Expose runner ip address to runners API
merge_request: 18799
author: Lars Greiss
type: changed

View file

@ -967,6 +967,7 @@ module API
class Runner < Grape::Entity
expose :id
expose :description
expose :ip_address
expose :active
expose :is_shared
expose :name

View file

@ -46,6 +46,7 @@ describe API::Runners do
expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers
expect(json_response).to be_an Array
expect(json_response[0]).to have_key('ip_address')
expect(descriptions).to contain_exactly(
'Project runner', 'Two projects runner'
)
@ -59,6 +60,7 @@ describe API::Runners do
expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers
expect(json_response).to be_an Array
expect(json_response[0]).to have_key('ip_address')
expect(shared).to be_falsey
end
@ -87,6 +89,7 @@ describe API::Runners do
expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers
expect(json_response).to be_an Array
expect(json_response[0]).to have_key('ip_address')
expect(shared).to be_truthy
end
end
@ -106,6 +109,7 @@ describe API::Runners do
expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers
expect(json_response).to be_an Array
expect(json_response[0]).to have_key('ip_address')
expect(shared).to be_falsey
end
@ -515,6 +519,7 @@ describe API::Runners do
expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers
expect(json_response).to be_an Array
expect(json_response[0]).to have_key('ip_address')
expect(shared).to be_truthy
end
end