Optimize CI/CD build retry service specs
This commit is contained in:
parent
01f37eb77b
commit
4a6dee5f18
|
@ -1,9 +1,10 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Ci::RetryBuildService do
|
||||
let(:user) { create(:user) }
|
||||
let(:project) { create(:project) }
|
||||
let(:pipeline) { create(:ci_pipeline, project: project) }
|
||||
set(:user) { create(:user) }
|
||||
set(:project) { create(:project) }
|
||||
set(:pipeline) { create(:ci_pipeline, project: project) }
|
||||
|
||||
let(:build) { create(:ci_build, pipeline: pipeline) }
|
||||
|
||||
let(:service) do
|
||||
|
@ -37,7 +38,7 @@ describe Ci::RetryBuildService do
|
|||
:queued, :coverage, :tags, :allowed_to_fail, :on_tag,
|
||||
:triggered, :trace, :teardown_environment,
|
||||
description: 'my-job', stage: 'test', pipeline: pipeline,
|
||||
auto_canceled_by: create(:ci_empty_pipeline)) do |build|
|
||||
auto_canceled_by: create(:ci_empty_pipeline, project: project)) do |build|
|
||||
##
|
||||
# TODO, workaround for FactoryGirl limitation when having both
|
||||
# stage (text) and stage_id (integer) columns in the table.
|
||||
|
|
Loading…
Reference in New Issue