Commit f3440e59 authored by Lars Greiss's avatar Lars Greiss

Expose runner ip address to runners API

Signed-off-by: default avatarLars Greiss <l.greiss@mediacologne.de>
parent 94099f2d
...@@ -967,6 +967,7 @@ module API ...@@ -967,6 +967,7 @@ module API
class Runner < Grape::Entity class Runner < Grape::Entity
expose :id expose :id
expose :description expose :description
expose :ip_address
expose :active expose :active
expose :is_shared expose :is_shared
expose :name expose :name
......
...@@ -46,6 +46,7 @@ describe API::Runners do ...@@ -46,6 +46,7 @@ describe API::Runners do
expect(response).to have_gitlab_http_status(200) expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers expect(response).to include_pagination_headers
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response[0]).to have_key('ip_address')
expect(descriptions).to contain_exactly( expect(descriptions).to contain_exactly(
'Project runner', 'Two projects runner' 'Project runner', 'Two projects runner'
) )
...@@ -59,6 +60,7 @@ describe API::Runners do ...@@ -59,6 +60,7 @@ describe API::Runners do
expect(response).to have_gitlab_http_status(200) expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers expect(response).to include_pagination_headers
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response[0]).to have_key('ip_address')
expect(shared).to be_falsey expect(shared).to be_falsey
end end
...@@ -87,6 +89,7 @@ describe API::Runners do ...@@ -87,6 +89,7 @@ describe API::Runners do
expect(response).to have_gitlab_http_status(200) expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers expect(response).to include_pagination_headers
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response[0]).to have_key('ip_address')
expect(shared).to be_truthy expect(shared).to be_truthy
end end
end end
...@@ -106,6 +109,7 @@ describe API::Runners do ...@@ -106,6 +109,7 @@ describe API::Runners do
expect(response).to have_gitlab_http_status(200) expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers expect(response).to include_pagination_headers
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response[0]).to have_key('ip_address')
expect(shared).to be_falsey expect(shared).to be_falsey
end end
...@@ -515,6 +519,7 @@ describe API::Runners do ...@@ -515,6 +519,7 @@ describe API::Runners do
expect(response).to have_gitlab_http_status(200) expect(response).to have_gitlab_http_status(200)
expect(response).to include_pagination_headers expect(response).to include_pagination_headers
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response[0]).to have_key('ip_address')
expect(shared).to be_truthy expect(shared).to be_truthy
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment