Commit f45358db authored by Grzegorz Bizon's avatar Grzegorz Bizon

Bring seeds size method back to CI/CD pipeline class

parent 99469aaf
...@@ -371,6 +371,10 @@ module Ci ...@@ -371,6 +371,10 @@ module Ci
end end
end end
def seeds_size
stage_seeds.sum(&:size)
end
def has_kubernetes_active? def has_kubernetes_active?
project.deployment_platform&.active? project.deployment_platform&.active?
end end
......
...@@ -330,6 +330,23 @@ describe Ci::Pipeline, :mailer do ...@@ -330,6 +330,23 @@ describe Ci::Pipeline, :mailer do
end end
end end
describe '#seeds_size' do
context 'when refs policy is specified' do
let(:config) do
{ production: { stage: 'deploy', script: 'cap prod', only: ['master'] },
spinach: { stage: 'test', script: 'spinach', only: ['tags'] } }
end
let(:pipeline) do
build(:ci_pipeline, ref: 'feature', tag: true, config: config)
end
it 'returns real seeds size' do
expect(pipeline.seeds_size).to eq 1
end
end
end
describe 'legacy stages' do describe 'legacy stages' do
before do before do
create(:commit_status, pipeline: pipeline, create(:commit_status, pipeline: pipeline,
......
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