diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-12-19 11:16:08 +0100 |
---|---|---|
committer | Francisco Javier López <fjlopez@gitlab.com> | 2018-12-19 13:08:14 +0100 |
commit | 1da7d0ec49aa30d2b39d8abc7867ded7b18defb4 (patch) | |
tree | 8cf455f2b06176e17e0f6ea23163831c37246d07 | |
parent | ffef28ccd6d37ade2c3ee3ca46679749f9cf09aa (diff) | |
download | gitlab-ce-1da7d0ec49aa30d2b39d8abc7867ded7b18defb4.tar.gz |
Removed pipeline_ci_sources_only feature flag
Removing the pipeline_ci_sources_only feature flag introduced
in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23353
-rw-r--r-- | app/models/project.rb | 2 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 21 |
2 files changed, 4 insertions, 19 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 67262ecce85..0711cd4aabd 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -256,7 +256,7 @@ class Project < ActiveRecord::Base # other pipelines, like webide ones, that we won't retrieve # if we use this relation. has_many :ci_pipelines, - -> { Feature.enabled?(:pipeline_ci_sources_only, default_enabled: true) ? ci_sources : all }, + -> { ci_sources }, class_name: 'Ci::Pipeline', inverse_of: :project has_many :stages, class_name: 'Ci::Stage', inverse_of: :project diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 5e63f14b720..3ba00e2f25d 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -145,25 +145,10 @@ describe Project do end describe 'ci_pipelines association' do - context 'when feature flag pipeline_ci_sources_only is enabled' do - it 'returns only pipelines from ci_sources' do - stub_feature_flags(pipeline_ci_sources_only: true) + it 'returns only pipelines from ci_sources' do + expect(Ci::Pipeline).to receive(:ci_sources).and_call_original - expect(Ci::Pipeline).to receive(:ci_sources).and_call_original - - subject.ci_pipelines - 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 + subject.ci_pipelines end end end |