提交 f45358db 编写于 作者: G Grzegorz Bizon

Bring seeds size method back to CI/CD pipeline class

上级 99469aaf
......@@ -371,6 +371,10 @@ module Ci
end
end
def seeds_size
stage_seeds.sum(&:size)
end
def has_kubernetes_active?
project.deployment_platform&.active?
end
......
......@@ -330,6 +330,23 @@ describe Ci::Pipeline, :mailer do
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
before do
create(:commit_status, pipeline: pipeline,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册