BigW Consortium Gitlab

Commit cae3092f by Grzegorz Bizon

Fix specs creating a pipeline stage with implicit index

parent f0d59b95
......@@ -2,6 +2,7 @@ FactoryBot.define do
factory :commit_status, class: CommitStatus do
name 'default'
stage 'test'
stage_idx 0
status 'success'
description 'commit status'
pipeline factory: :ci_pipeline_with_one_job
......
......@@ -17,7 +17,7 @@ describe Gitlab::Ci::Pipeline::Chain::Create do
context 'when pipeline is ready to be saved' do
before do
pipeline.stages.build(name: 'test', project: project)
pipeline.stages.build(name: 'test', index: 0, project: project)
step.perform!
end
......
......@@ -6,7 +6,9 @@ describe Ci::RetryBuildService do
set(:pipeline) { create(:ci_pipeline, project: project) }
let(:stage) do
Ci::Stage.create!(project: project, pipeline: pipeline, name: 'test')
create(:ci_stage_entity, project: project,
pipeline: pipeline,
name: 'test')
end
let(:build) { create(:ci_build, pipeline: pipeline, stage_id: stage.id) }
......
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