diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-01-31 21:56:04 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-02-06 15:50:08 +0900 |
commit | adfe2cb35bfad1dfe2a7fdbd0cf20303fa45b0e8 (patch) | |
tree | ea4a7f3d9bc9d7b891658ab735541e24f52128b2 | |
parent | c9ed3b2d4d208b7452fc2e057f11d28356c08887 (diff) | |
download | gitlab-ce-adfe2cb35bfad1dfe2a7fdbd0cf20303fa45b0e8.tar.gz |
Fix retry_build_service_spec.rb with trace_artifact trait
-rw-r--r-- | spec/factories/ci/builds.rb | 6 | ||||
-rw-r--r-- | spec/services/ci/retry_build_service_spec.rb | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index 6f66468570f..29136043f6c 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -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( diff --git a/spec/services/ci/retry_build_service_spec.rb b/spec/services/ci/retry_build_service_spec.rb index f0681386b75..2c2f48e323d 100644 --- a/spec/services/ci/retry_build_service_spec.rb +++ b/spec/services/ci/retry_build_service_spec.rb @@ -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| ## |