Fix specs creating a pipeline stage with implicit index
This commit is contained in:
parent
f0d59b95f1
commit
cae3092f23
3 changed files with 5 additions and 2 deletions
|
@ -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) }
|
||||
|
|
Loading…
Reference in a new issue