Commit 1a6d9789 authored by Dylan Griffith's avatar Dylan Griffith

Remove unnecessary API specs for group runners since we do not have API support yet

parent e2b62f6e
...@@ -47,7 +47,7 @@ describe API::Runners do ...@@ -47,7 +47,7 @@ describe API::Runners do
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(descriptions).to contain_exactly( expect(descriptions).to contain_exactly(
'Project runner', 'Group runner', 'Two projects runner' 'Project runner', 'Two projects runner'
) )
expect(shared).to be_falsey expect(shared).to be_falsey
end end
...@@ -149,16 +149,6 @@ describe API::Runners do ...@@ -149,16 +149,6 @@ describe API::Runners do
expect(json_response['projects'].first['id']).to eq(project.id) expect(json_response['projects'].first['id']).to eq(project.id)
end 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 end
it 'returns 404 if runner does not exists' do it 'returns 404 if runner does not exists' do
...@@ -188,29 +178,12 @@ describe API::Runners do ...@@ -188,29 +178,12 @@ describe API::Runners do
end end
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 context 'other authorized user' do
it "does not return project runner's details" do it "does not return project runner's details" do
get api("/runners/#{project_runner.id}", user2) get api("/runners/#{project_runner.id}", user2)
expect(response).to have_http_status(403) expect(response).to have_http_status(403)
end 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 end
context 'unauthorized user' do context 'unauthorized user' do
...@@ -219,12 +192,6 @@ describe API::Runners do ...@@ -219,12 +192,6 @@ describe API::Runners do
expect(response).to have_http_status(401) expect(response).to have_http_status(401)
end 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
end end
...@@ -301,12 +268,6 @@ describe API::Runners do ...@@ -301,12 +268,6 @@ describe API::Runners do
expect(response).to have_http_status(403) expect(response).to have_http_status(403)
end 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 it 'updates project runner with access to it' do
description = project_runner.description description = project_runner.description
put api("/runners/#{project_runner.id}", admin), description: 'test' put api("/runners/#{project_runner.id}", admin), description: 'test'
...@@ -316,16 +277,6 @@ describe API::Runners do ...@@ -316,16 +277,6 @@ describe API::Runners do
expect(project_runner.description).to eq('test') expect(project_runner.description).to eq('test')
expect(project_runner.description).not_to eq(description) expect(project_runner.description).not_to eq(description)
end 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
end end
...@@ -335,12 +286,6 @@ describe API::Runners do ...@@ -335,12 +286,6 @@ describe API::Runners do
expect(response).to have_http_status(401) expect(response).to have_http_status(401)
end 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
end end
...@@ -376,14 +321,6 @@ describe API::Runners do ...@@ -376,14 +321,6 @@ describe API::Runners do
expect(response).to have_http_status(204) expect(response).to have_http_status(204)
end.to change { Ci::Runner.specific.count }.by(-1) end.to change { Ci::Runner.specific.count }.by(-1)
end 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 end
it 'returns 404 if runner does not exists' do it 'returns 404 if runner does not exists' do
...@@ -420,14 +357,6 @@ describe API::Runners do ...@@ -420,14 +357,6 @@ describe API::Runners do
end.to change { Ci::Runner.specific.count }.by(-1) end.to change { Ci::Runner.specific.count }.by(-1)
end 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 it_behaves_like '412 response' do
let(:request) { api("/runners/#{project_runner.id}", user) } let(:request) { api("/runners/#{project_runner.id}", user) }
end end
...@@ -440,12 +369,6 @@ describe API::Runners do ...@@ -440,12 +369,6 @@ describe API::Runners do
expect(response).to have_http_status(401) expect(response).to have_http_status(401)
end 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
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