Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-07-04 12:02:45 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-07-04 12:02:45 +0300
commitd3bcb06dc6365129b62dadf49efc58daecd39a83 (patch)
treef44332a1d3dccfabd84df94c44eacfb459f34385 /spec/requests/api/runners_spec.rb
parentca93faf15f822cbf3eda5e87d4aaaaa81d413a8b (diff)
Make deprecated scopes of Runner explicit
Diffstat (limited to 'spec/requests/api/runners_spec.rb')
-rw-r--r--spec/requests/api/runners_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb
index 0ad6472a59c..b5e4b6011ea 100644
--- a/spec/requests/api/runners_spec.rb
+++ b/spec/requests/api/runners_spec.rb
@@ -90,6 +90,17 @@ describe API::Runners do
end
it 'filters runners by scope' do
+ get api('/runners/all?scope=shared', admin)
+
+ shared = json_response.all? { |r| r['is_shared'] }
+ 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
+
+ it 'filters runners by scope' do
get api('/runners/all?scope=specific', admin)
shared = json_response.any? { |r| r['is_shared'] }
@@ -584,7 +595,7 @@ describe API::Runners do
end
end
- it 'enables a instance-wide runner' do
+ it 'enables a instance type runner' do
expect do
post api("/projects/#{project.id}/runners", admin), runner_id: shared_runner.id
end.to change { project.runners.count }.by(1)