diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-04-30 18:13:16 +0400 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-04-30 18:13:16 +0400 |
commit | 1a6d9789db04c3caa4f15ea76399c417f310a6a7 (patch) | |
tree | 45e0d72f7ec0aa54e72be2fa3f3b1d212611ed55 | |
parent | e2b62f6e4441fe5fd0f721d5a824c62c7f40e013 (diff) | |
download | gitlab-ce-1a6d9789db04c3caa4f15ea76399c417f310a6a7.tar.gz |
Remove unnecessary API specs for group runners since we do not have API support yet
-rw-r--r-- | spec/requests/api/runners_spec.rb | 79 |
1 files changed, 1 insertions, 78 deletions
diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb index 89e21ba9914..f22fec31514 100644 --- a/spec/requests/api/runners_spec.rb +++ b/spec/requests/api/runners_spec.rb @@ -47,7 +47,7 @@ describe API::Runners do expect(response).to include_pagination_headers expect(json_response).to be_an Array expect(descriptions).to contain_exactly( - 'Project runner', 'Group runner', 'Two projects runner' + 'Project runner', 'Two projects runner' ) expect(shared).to be_falsey end @@ -149,16 +149,6 @@ describe API::Runners do expect(json_response['projects'].first['id']).to eq(project.id) end - - it "returns the group's details for a group runner" do - get api("/runners/#{group_runner.id}", admin) - - expect(json_response['groups'].first).to eq( - 'id' => group.id, - 'web_url' => group.web_url, - 'name' => group.name - ) - end end it 'returns 404 if runner does not exists' do @@ -188,29 +178,12 @@ describe API::Runners do end end - context "runner group's administrative user" do - context 'when runner is not shared' do - it "returns runner's details" do - get api("/runners/#{group_runner.id}", user) - - expect(response).to have_http_status(200) - expect(json_response['id']).to eq(group_runner.id) - end - end - end - context 'other authorized user' do it "does not return project runner's details" do get api("/runners/#{project_runner.id}", user2) expect(response).to have_http_status(403) end - - it "does not return group runner's details" do - get api("/runners/#{group_runner.id}", user2) - - expect(response).to have_gitlab_http_status(403) - end end context 'unauthorized user' do @@ -219,12 +192,6 @@ describe API::Runners do expect(response).to have_http_status(401) end - - it "does not return group runner's details" do - get api("/runners/#{group_runner.id}") - - expect(response).to have_gitlab_http_status(401) - end end end @@ -301,12 +268,6 @@ describe API::Runners do expect(response).to have_http_status(403) end - it 'does not update group runner without access to it' do - put api("/runners/#{group_runner.id}", user2), description: 'test' - - expect(response).to have_gitlab_http_status(403) - end - it 'updates project runner with access to it' do description = project_runner.description put api("/runners/#{project_runner.id}", admin), description: 'test' @@ -316,16 +277,6 @@ describe API::Runners do expect(project_runner.description).to eq('test') expect(project_runner.description).not_to eq(description) end - - it 'updates group runner with access to it' do - description = group_runner.description - put api("/runners/#{group_runner.id}", admin), description: 'test' - group_runner.reload - - expect(response).to have_gitlab_http_status(200) - expect(group_runner.description).to eq('test') - expect(group_runner.description).not_to eq(description) - end end end @@ -335,12 +286,6 @@ describe API::Runners do expect(response).to have_http_status(401) end - - it 'does not delete group runner' do - put api("/runners/#{group_runner.id}") - - expect(response).to have_gitlab_http_status(401) - end end end @@ -376,14 +321,6 @@ describe API::Runners do expect(response).to have_http_status(204) end.to change { Ci::Runner.specific.count }.by(-1) end - - it 'deletes used group runner' do - expect do - delete api("/runners/#{group_runner.id}", admin) - - expect(response).to have_gitlab_http_status(204) - end.to change { Ci::Runner.specific.count }.by(-1) - end end it 'returns 404 if runner does not exists' do @@ -420,14 +357,6 @@ describe API::Runners do end.to change { Ci::Runner.specific.count }.by(-1) end - it 'deletes group runner for one owned group' do - expect do - delete api("/runners/#{group_runner.id}", user) - - expect(response).to have_gitlab_http_status(204) - end.to change { Ci::Runner.specific.count }.by(-1) - end - it_behaves_like '412 response' do let(:request) { api("/runners/#{project_runner.id}", user) } end @@ -440,12 +369,6 @@ describe API::Runners do expect(response).to have_http_status(401) end - - it 'does not delete group runner' do - delete api("/runners/#{group_runner.id}") - - expect(response).to have_gitlab_http_status(401) - end end end |