diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-12-20 10:07:09 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-12-20 10:07:09 +0000 |
commit | f7ac8041f7ba3639085c26b4185eda00fd54a6e7 (patch) | |
tree | fe8198ac1bd9c03d3fbe95753296aee50542166b | |
parent | c20f0564015be67ac7871abbd0a2ed8762484cea (diff) | |
parent | 1da7d0ec49aa30d2b39d8abc7867ded7b18defb4 (diff) | |
download | gitlab-ce-f7ac8041f7ba3639085c26b4185eda00fd54a6e7.tar.gz |
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
-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 fdb5c5d7744..e4b8db860a4 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 |