Commit f7ac8041 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'fj-remove-pipeline_ci_sources_only-feature-glag' into 'master'

Removed pipeline_ci_sources_only feature flag

See merge request gitlab-org/gitlab-ce!23926
parents c20f0564 1da7d0ec
...@@ -256,7 +256,7 @@ class Project < ActiveRecord::Base ...@@ -256,7 +256,7 @@ class Project < ActiveRecord::Base
# other pipelines, like webide ones, that we won't retrieve # other pipelines, like webide ones, that we won't retrieve
# if we use this relation. # if we use this relation.
has_many :ci_pipelines, has_many :ci_pipelines,
-> { Feature.enabled?(:pipeline_ci_sources_only, default_enabled: true) ? ci_sources : all }, -> { ci_sources },
class_name: 'Ci::Pipeline', class_name: 'Ci::Pipeline',
inverse_of: :project inverse_of: :project
has_many :stages, class_name: 'Ci::Stage', inverse_of: :project has_many :stages, class_name: 'Ci::Stage', inverse_of: :project
......
...@@ -145,27 +145,12 @@ describe Project do ...@@ -145,27 +145,12 @@ describe Project do
end end
describe 'ci_pipelines association' do describe 'ci_pipelines association' do
context 'when feature flag pipeline_ci_sources_only is enabled' do
it 'returns only pipelines from ci_sources' do it 'returns only pipelines from ci_sources' do
stub_feature_flags(pipeline_ci_sources_only: true)
expect(Ci::Pipeline).to receive(:ci_sources).and_call_original expect(Ci::Pipeline).to receive(:ci_sources).and_call_original
subject.ci_pipelines subject.ci_pipelines
end end
end end
context 'when feature flag pipeline_ci_sources_only is disabled' do
it 'returns all pipelines' do
stub_feature_flags(pipeline_ci_sources_only: false)
expect(Ci::Pipeline).not_to receive(:ci_sources).and_call_original
expect(Ci::Pipeline).to receive(:all).and_call_original.at_least(:once)
subject.ci_pipelines
end
end
end
end end
describe 'modules' do describe 'modules' do
......
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