Fix retry_build_service_spec.rb with trace_artifact trait

This commit is contained in:
Shinya Maeda 2018-01-31 21:56:04 +09:00
parent c9ed3b2d4d
commit adfe2cb35b
2 changed files with 7 additions and 1 deletions

View File

@ -141,6 +141,12 @@ FactoryBot.define do
end
end
trait :trace_artifact do
after(:create) do |build, evaluator|
create(:ci_job_artifact, :trace, job: build)
end
end
trait :unicode_trace do
after(:create) do |build, evaluator|
trace = File.binread(

View File

@ -37,7 +37,7 @@ describe Ci::RetryBuildService do
let(:build) do
create(:ci_build, :failed, :artifacts, :expired, :erased,
:queued, :coverage, :tags, :allowed_to_fail, :on_tag,
:triggered, :trace, :teardown_environment,
:triggered, :trace_artifact, :teardown_environment,
description: 'my-job', stage: 'test', pipeline: pipeline,
auto_canceled_by: create(:ci_empty_pipeline, project: project)) do |build|
##