Commit 4a6dee5f authored by Grzegorz Bizon's avatar Grzegorz Bizon

Optimize CI/CD build retry service specs

parent 01f37eb7
require 'spec_helper' require 'spec_helper'
describe Ci::RetryBuildService do describe Ci::RetryBuildService do
let(:user) { create(:user) } set(:user) { create(:user) }
let(:project) { create(:project) } set(:project) { create(:project) }
let(:pipeline) { create(:ci_pipeline, project: project) } set(:pipeline) { create(:ci_pipeline, project: project) }
let(:build) { create(:ci_build, pipeline: pipeline) } let(:build) { create(:ci_build, pipeline: pipeline) }
let(:service) do let(:service) do
...@@ -37,7 +38,7 @@ describe Ci::RetryBuildService do ...@@ -37,7 +38,7 @@ describe Ci::RetryBuildService do
:queued, :coverage, :tags, :allowed_to_fail, :on_tag, :queued, :coverage, :tags, :allowed_to_fail, :on_tag,
:triggered, :trace, :teardown_environment, :triggered, :trace, :teardown_environment,
description: 'my-job', stage: 'test', pipeline: pipeline, 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 # TODO, workaround for FactoryGirl limitation when having both
# stage (text) and stage_id (integer) columns in the table. # stage (text) and stage_id (integer) columns in the table.
......
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