2019-02-15 15:39:39 +05:30
|
|
|
FactoryBot.define do
|
|
|
|
factory :pool_repository do
|
|
|
|
shard { Shard.by_name("default") }
|
|
|
|
state :none
|
|
|
|
|
|
|
|
before(:create) do |pool|
|
|
|
|
pool.source_project = create(:project, :repository)
|
2019-07-31 22:56:46 +05:30
|
|
|
pool.source_project.update!(pool_repository: pool)
|
2019-02-15 15:39:39 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
trait :scheduled do
|
|
|
|
state :scheduled
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :failed do
|
|
|
|
state :failed
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :obsolete do
|
|
|
|
state :obsolete
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :ready do
|
|
|
|
state :ready
|
|
|
|
|
|
|
|
after(:create) do |pool|
|
|
|
|
pool.create_object_pool
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|