diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/factories/ci/builds.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/factories/ci/builds.rb')
-rw-r--r-- | spec/factories/ci/builds.rb | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index f99021ad223..395d3ea598c 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -79,6 +79,7 @@ FactoryBot.define do trait :pending do queued_at { 'Di 29. Okt 09:50:59 CET 2013' } + status { 'pending' } end @@ -237,6 +238,20 @@ FactoryBot.define do coverage_regex { '/(d+)/' } end + trait :trace_with_coverage do + coverage { nil } + coverage_regex { '(\d+\.\d+)%' } + + transient do + trace_coverage { 60.0 } + end + + after(:create) do |build, evaluator| + build.trace.set("Coverage #{evaluator.trace_coverage}%") + build.trace.archive! if build.complete? + end + end + trait :trace_live do after(:create) do |build, evaluator| build.trace.set('BUILD TRACE') @@ -286,6 +301,15 @@ FactoryBot.define do trait :queued do queued_at { Time.now } + + after(:create) do |build| + build.create_queuing_entry! + end + end + + trait :picked do + running + runner factory: :ci_runner end @@ -484,14 +508,6 @@ FactoryBot.define do end end - trait :license_management do - options do - { - artifacts: { reports: { license_management: 'gl-license-management-report.json' } } - } - end - end - trait :license_scanning do options do { |