diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-09 09:57:16 +0200 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-09 09:57:16 +0200 |
commit | 89ec120f61f8becb79403e7ad0a26fc8b942b57b (patch) | |
tree | b10bf82d123f387c83ea2b12bbfea93259fcad67 | |
parent | 4c2cf90780632db93ac7a39513277f17f4bc3da8 (diff) | |
download | gitlab-ce-89ec120f61f8becb79403e7ad0a26fc8b942b57b.tar.gz |
Add validation Ci::Runner runner_type must be present
-rw-r--r-- | app/models/ci/runner.rb | 1 | ||||
-rw-r--r-- | spec/models/ci/runner_spec.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb index 23078f1c3ed..ed8b30dae49 100644 --- a/app/models/ci/runner.rb +++ b/app/models/ci/runner.rb @@ -58,6 +58,7 @@ module Ci validate :tag_constraints validate :either_projects_or_group validates :access_level, presence: true + validates :runner_type, presence: true acts_as_taggable diff --git a/spec/models/ci/runner_spec.rb b/spec/models/ci/runner_spec.rb index fa9dff1c0f1..eb59ba7cbe9 100644 --- a/spec/models/ci/runner_spec.rb +++ b/spec/models/ci/runner_spec.rb @@ -3,6 +3,7 @@ require 'spec_helper' describe Ci::Runner do describe 'validation' do it { is_expected.to validate_presence_of(:access_level) } + it { is_expected.to validate_presence_of(:runner_type) } context 'when runner is not allowed to pick untagged jobs' do context 'when runner does not have tags' do |