Commit a0920df2 authored by Kamil Trzciński's avatar Kamil Trzciński

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
parents 0a46bf70 ed408034
---
title: Expose runner ip address to runners API
merge_request: 18799
author: Lars Greiss
type: changed
...@@ -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