29 lines
571 B
Ruby
29 lines
571 B
Ruby
|
FactoryGirl.define do
|
||
|
factory :provider_gcp, class: Clusters::Providers::Gcp do
|
||
|
cluster
|
||
|
gcp_project_id 'test-gcp-project'
|
||
|
|
||
|
trait :creating do
|
||
|
access_token 'access_token_123'
|
||
|
|
||
|
after(:build) do |gcp, evaluator|
|
||
|
gcp.make_creating('operation-123')
|
||
|
end
|
||
|
end
|
||
|
|
||
|
trait :created do
|
||
|
endpoint '111.111.111.111'
|
||
|
|
||
|
after(:build) do |gcp, evaluator|
|
||
|
gcp.make_created
|
||
|
end
|
||
|
end
|
||
|
|
||
|
trait :errored do
|
||
|
after(:build) do |gcp, evaluator|
|
||
|
gcp.make_errored('Something wrong')
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|