summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorKamil TrzciƄski <ayufan@ayufan.eu>2018-05-28 13:09:31 +0200
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-31 10:56:41 +0200
commit385f37a724f8c63f551e7236649a3f28058b860b (patch)
tree20f8767e4206fffa05d9c91e802cea2014ea71ff /spec/requests
parentcfee3e0c4ef3a8b3bf6aafd325c791d0d89d68df (diff)
downloadgitlab-ce-385f37a724f8c63f551e7236649a3f28058b860b.tar.gz
Improve runner registration API
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/runner_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb
index c3c8d95dded..c63d894e3dd 100644
--- a/spec/requests/api/runner_spec.rb
+++ b/spec/requests/api/runner_spec.rb
@@ -115,7 +115,9 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
post api('/runners'), token: registration_token,
run_untagged: false
- expect(response).to have_gitlab_http_status 404
+ expect(response).to have_gitlab_http_status 400
+ expect(json_response['message']).to include(
+ 'tags_list' => ['can not be empty when runner is not allowed to pick untagged jobs'])
end
end
end
@@ -720,7 +722,7 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
end
context 'when runner specifies lower timeout' do
- let(:runner) { create(:ci_runner, maximum_timeout: 1000) }
+ let(:runner) { create(:ci_runner, :project, maximum_timeout: 1000, projects: [project]) }
it 'contains info about timeout overridden by runner' do
request_job
@@ -731,7 +733,7 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
end
context 'when runner specifies bigger timeout' do
- let(:runner) { create(:ci_runner, maximum_timeout: 2000) }
+ let(:runner) { create(:ci_runner, :project, maximum_timeout: 2000, projects: [project]) }
it 'contains info about timeout not overridden by runner' do
request_job