2021-05-05 17:09:59 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :ci_runner_namespace, class: 'Ci::RunnerNamespace' do
|
|
|
|
group
|
2021-10-25 02:09:46 -04:00
|
|
|
|
|
|
|
after(:build) do |runner_namespace, evaluator|
|
|
|
|
unless runner_namespace.runner.present?
|
|
|
|
runner_namespace.runner = build(
|
|
|
|
:ci_runner, :group, runner_namespaces: [runner_namespace]
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
2021-05-05 17:09:59 -04:00
|
|
|
end
|
|
|
|
end
|