FactoryBot.define do
factory :pool_repository do
shard { Shard.by_name("default") }
state :none
before(:create) do |pool|
pool.source_project = create(:project, :repository)
end
trait :scheduled do
state :scheduled
trait :failed do
state :failed
trait :ready do
state :ready
after(:create) do |pool|
pool.create_object_pool