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
path: root/lib/ci
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-01-04 12:46:56 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-01-04 12:46:56 +0300
commit8c9a4ed373f4b517aeae669e64023dc52c8d704a (patch)
tree9cc481363e1c933796e44057f437fd65ea16aa77 /lib/ci
parentf35336a1e6b1eb750a501a5d54396816f4800e69 (diff)
WIP: Add tests and make sure that headers are set
* We realized that headers were not set whenever we give 204 because `render_api_error!` doesn't preserve the headers. * We also realized that `update_runner_info` would be called in POST /builds/register every time therefore runner is updated every time, ticking the queue, making this last_update didn't work very well, and the test would be failing due to that.
Diffstat (limited to 'lib/ci')
-rw-r--r--lib/ci/api/builds.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb
index 8264210c460..de3e224bcee 100644
--- a/lib/ci/api/builds.rb
+++ b/lib/ci/api/builds.rb
@@ -17,7 +17,7 @@ module Ci
update_runner_info
if current_runner.is_runner_queue_value_latest?(params[:last_update])
- headers 'X-GitLab-Last-Update', params[:last_update]
+ header 'X-GitLab-Last-Update', params[:last_update]
return build_not_found!
end
@@ -33,7 +33,7 @@ module Ci
else
Gitlab::Metrics.add_event(:build_not_found)
- headers 'X-GitLab-Last-Update', new_update
+ header 'X-GitLab-Last-Update', new_update
build_not_found!
end