Commit 361c2785 authored by James Lopez's avatar James Lopez

Merge branch '198499-remove-ff-validate_scheduling_type_of_processables' into 'master'

Remove FF validate_scheduling_type_of_processables

See merge request gitlab-org/gitlab!31605
parents cabd726c ae2d0864
......@@ -49,7 +49,7 @@ module Ci
end
validates :type, presence: true
validates :scheduling_type, presence: true, on: :create, if: :validate_scheduling_type?
validates :scheduling_type, presence: true, on: :create, unless: :importing?
delegate :merge_request?,
:merge_request_ref?,
......@@ -99,11 +99,5 @@ module Ci
needs.map { |need| need.attributes.except('id', 'build_id') }
end
end
private
def validate_scheduling_type?
!importing? && Feature.enabled?(:validate_scheduling_type_of_processables, project)
end
end
end
......@@ -52,18 +52,12 @@ describe Ci::Processable do
subject { build(:ci_build, project: project, pipeline: pipeline, importing: importing) }
where(:importing, :validate_scheduling_type_flag, :should_validate) do
false | true | true
false | false | false
true | true | false
true | false | false
where(:importing, :should_validate) do
false | true
true | false
end
with_them do
before do
stub_feature_flags(validate_scheduling_type_of_processables: validate_scheduling_type_flag)
end
context 'on create' do
it 'validates presence' do
if should_validate
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment