diff options
author | Grzegorz Bizon <grzegorz.bizon@ntsn.pl> | 2015-12-11 14:43:44 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzegorz.bizon@ntsn.pl> | 2015-12-11 14:43:44 +0100 |
commit | 6b0c0d5bcc7940c7d84b8af965b2c4f9ceeb4175 (patch) | |
tree | f527119ca6c43f190bbaaef4dc277808ca24a009 | |
parent | 917effb7379f8e871dbc113d7c7dab89473d4bc8 (diff) | |
download | gitlab-ce-6b0c0d5bcc7940c7d84b8af965b2c4f9ceeb4175.tar.gz |
Ensure that runners registration token is present
-rw-r--r-- | app/views/ci/admin/runners/index.html.haml | 2 | ||||
-rw-r--r-- | lib/ci/api/helpers.rb | 2 | ||||
-rw-r--r-- | spec/features/ci/admin/runners_spec.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/views/ci/admin/runners/index.html.haml b/app/views/ci/admin/runners/index.html.haml index 95bc8ebd40f..0574ed38015 100644 --- a/app/views/ci/admin/runners/index.html.haml +++ b/app/views/ci/admin/runners/index.html.haml @@ -3,7 +3,7 @@ To register a new runner you should enter the following registration token. With this token the runner will request a unique runner token and use that for future communication. Registration token is - %code{ id: 'runners-token' } #{current_application_settings.runners_registration_token} + %code{ id: 'runners-token' } #{current_application_settings.ensure_runners_registration_token} .bs-callout.clearfix .pull-left diff --git a/lib/ci/api/helpers.rb b/lib/ci/api/helpers.rb index 12d7396189d..abd1869efc0 100644 --- a/lib/ci/api/helpers.rb +++ b/lib/ci/api/helpers.rb @@ -23,7 +23,7 @@ module Ci end def runner_registration_token_valid? - params[:token] == current_application_settings.runners_registration_token + params[:token] == current_application_settings.ensure_runners_registration_token end def update_runner_last_contact diff --git a/spec/features/ci/admin/runners_spec.rb b/spec/features/ci/admin/runners_spec.rb index 0c5aebb3a7b..fd1967d0698 100644 --- a/spec/features/ci/admin/runners_spec.rb +++ b/spec/features/ci/admin/runners_spec.rb @@ -63,7 +63,7 @@ describe "Admin Runners" do end describe 'runners registration token' do - let!(:token) { current_application_settings.runners_registration_token } + let!(:token) { current_application_settings.ensure_runners_registration_token } before { visit ci_admin_runners_path } it 'has a registration token' do |