Expose runner ip address to runners API

Signed-off-by: Lars Greiss <l.greiss@mediacologne.de>
This commit is contained in:
Lars Greiss 2018-05-07 22:45:01 +02:00
parent 94099f2dd6
commit f3440e5963
No known key found for this signature in database
GPG Key ID: C57384F7AF7A79AF
2 changed files with 6 additions and 0 deletions

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