summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-06-17 16:47:25 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2018-06-17 16:52:17 +0200
commitcc48d67ca57ac99e5c61b422a56d96a1643a7de8 (patch)
tree01c5eb4f4c3e637b0ee2ff345fae7567fa1804b7 /spec/requests
parent7b1eb2a669ad2a44dbe89d7d289d72870cbd74e7 (diff)
downloadgitlab-ce-cc48d67ca57ac99e5c61b422a56d96a1643a7de8.tar.gz
Optimised paused runners to not re-query every 3soptimise-paused-runners
We have long polling mechanism which is not being used by paused runners. This makes the paused runner to generate a request every 3s, where it could be fired only every 1h.
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/runner_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb
index 16e6f19773f..e7639599874 100644
--- a/spec/requests/api/runner_spec.rb
+++ b/spec/requests/api/runner_spec.rb
@@ -351,11 +351,13 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
context 'when valid token is provided' do
context 'when Runner is not active' do
let(:runner) { create(:ci_runner, :inactive) }
+ let(:update_value) { runner.ensure_runner_queue_value }
it 'returns 204 error' do
request_job
- expect(response).to have_gitlab_http_status 204
+ expect(response).to have_gitlab_http_status(204)
+ expect(response.header['X-GitLab-Last-Update']).to eq(update_value)
end
end