diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/factories/ci/processable.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'spec/factories/ci/processable.rb')
-rw-r--r-- | spec/factories/ci/processable.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/factories/ci/processable.rb b/spec/factories/ci/processable.rb new file mode 100644 index 00000000000..0550f4c23fa --- /dev/null +++ b/spec/factories/ci/processable.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :ci_processable, class: 'Ci::Processable' do + name { 'processable' } + stage { 'test' } + stage_idx { 0 } + ref { 'master' } + tag { false } + pipeline factory: :ci_pipeline + project { pipeline.project } + scheduling_type { 'stage' } + + trait :waiting_for_resource do + status { 'waiting_for_resource' } + end + + trait :resource_group do + waiting_for_resource_at { 5.minutes.ago } + + after(:build) do |processable, evaluator| + processable.resource_group = create(:ci_resource_group, project: processable.project) + end + end + end +end |