Add validation Ci::Runner runner_type must be present
This commit is contained in:
parent
4c2cf90780
commit
89ec120f61
|
@ -58,6 +58,7 @@ module Ci
|
||||||
validate :tag_constraints
|
validate :tag_constraints
|
||||||
validate :either_projects_or_group
|
validate :either_projects_or_group
|
||||||
validates :access_level, presence: true
|
validates :access_level, presence: true
|
||||||
|
validates :runner_type, presence: true
|
||||||
|
|
||||||
acts_as_taggable
|
acts_as_taggable
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ require 'spec_helper'
|
||||||
describe Ci::Runner do
|
describe Ci::Runner do
|
||||||
describe 'validation' do
|
describe 'validation' do
|
||||||
it { is_expected.to validate_presence_of(:access_level) }
|
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 is not allowed to pick untagged jobs' do
|
||||||
context 'when runner does not have tags' do
|
context 'when runner does not have tags' do
|
||||||
|
|
Loading…
Reference in New Issue