2018-03-17 18:26:18 +05:30
|
|
|
FactoryBot.define do
|
|
|
|
factory :clusters_applications_helm, class: Clusters::Applications::Helm do
|
|
|
|
cluster factory: %i(cluster provided_by_gcp)
|
|
|
|
|
|
|
|
trait :not_installable do
|
|
|
|
status(-2)
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :installable do
|
|
|
|
status 0
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :scheduled do
|
|
|
|
status 1
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :installing do
|
|
|
|
status 2
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :installed do
|
|
|
|
status 3
|
|
|
|
end
|
|
|
|
|
2018-12-05 23:21:45 +05:30
|
|
|
trait :updating do
|
|
|
|
status 4
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :updated do
|
|
|
|
status 5
|
|
|
|
end
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
trait :errored do
|
|
|
|
status(-1)
|
|
|
|
status_reason 'something went wrong'
|
|
|
|
end
|
|
|
|
|
2018-12-05 23:21:45 +05:30
|
|
|
trait :update_errored do
|
|
|
|
status(6)
|
|
|
|
status_reason 'something went wrong'
|
|
|
|
end
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
trait :timeouted do
|
|
|
|
installing
|
2018-12-05 23:21:45 +05:30
|
|
|
updated_at { ClusterWaitForAppInstallationWorker::TIMEOUT.ago }
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
|
2018-11-18 11:00:15 +05:30
|
|
|
factory :clusters_applications_ingress, class: Clusters::Applications::Ingress do
|
|
|
|
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
|
|
|
|
end
|
|
|
|
|
2018-12-23 12:14:25 +05:30
|
|
|
factory :clusters_applications_cert_managers, class: Clusters::Applications::CertManager do
|
|
|
|
email 'admin@example.com'
|
|
|
|
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
|
|
|
|
end
|
|
|
|
|
2018-11-18 11:00:15 +05:30
|
|
|
factory :clusters_applications_prometheus, class: Clusters::Applications::Prometheus do
|
|
|
|
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
|
|
|
|
end
|
|
|
|
|
|
|
|
factory :clusters_applications_runner, class: Clusters::Applications::Runner do
|
2018-12-23 12:14:25 +05:30
|
|
|
runner factory: %i(ci_runner)
|
2018-11-18 11:00:15 +05:30
|
|
|
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
|
|
|
|
end
|
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
factory :clusters_applications_knative, class: Clusters::Applications::Knative do
|
|
|
|
hostname 'example.com'
|
|
|
|
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
|
|
|
|
end
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
factory :clusters_applications_jupyter, class: Clusters::Applications::Jupyter do
|
|
|
|
oauth_application factory: :oauth_application
|
2018-12-05 23:21:45 +05:30
|
|
|
cluster factory: %i(cluster with_installed_helm provided_by_gcp project)
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
end
|