diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/factories/ci/runners.rb | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/factories/ci/runners.rb')
-rw-r--r-- | spec/factories/ci/runners.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/factories/ci/runners.rb b/spec/factories/ci/runners.rb index d0853df4e4b..6665b7b76a0 100644 --- a/spec/factories/ci/runners.rb +++ b/spec/factories/ci/runners.rb @@ -11,6 +11,7 @@ FactoryBot.define do runner_type { :instance_type } transient do + groups { [] } projects { [] } end @@ -18,6 +19,10 @@ FactoryBot.define do evaluator.projects.each do |proj| runner.runner_projects << build(:ci_runner_project, project: proj) end + + evaluator.groups.each do |group| + runner.runner_namespaces << build(:ci_runner_namespace, namespace: group) + end end trait :online do @@ -32,7 +37,9 @@ FactoryBot.define do runner_type { :group_type } after(:build) do |runner, evaluator| - runner.groups << build(:group) if runner.groups.empty? + if runner.runner_namespaces.empty? + runner.runner_namespaces << build(:ci_runner_namespace) + end end end |