summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/clusters/applications/helm.rb32
-rw-r--r--spec/factories/serverless/domain.rb11
2 files changed, 43 insertions, 0 deletions
diff --git a/spec/factories/clusters/applications/helm.rb b/spec/factories/clusters/applications/helm.rb
index ff9fc882dcc..0a4f0fba9ab 100644
--- a/spec/factories/clusters/applications/helm.rb
+++ b/spec/factories/clusters/applications/helm.rb
@@ -73,39 +73,71 @@ FactoryBot.define do
factory :clusters_applications_ingress, class: 'Clusters::Applications::Ingress' do
modsecurity_enabled { false }
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
+
+ trait :no_helm_installed do
+ cluster factory: %i(cluster provided_by_gcp)
+ end
end
factory :clusters_applications_cert_manager, class: 'Clusters::Applications::CertManager' do
email { 'admin@example.com' }
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
+
+ trait :no_helm_installed do
+ cluster factory: %i(cluster provided_by_gcp)
+ end
end
factory :clusters_applications_elastic_stack, class: 'Clusters::Applications::ElasticStack' do
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
+
+ trait :no_helm_installed do
+ cluster factory: %i(cluster provided_by_gcp)
+ end
end
factory :clusters_applications_crossplane, class: 'Clusters::Applications::Crossplane' do
stack { 'gcp' }
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
+
+ trait :no_helm_installed do
+ cluster factory: %i(cluster provided_by_gcp)
+ end
end
factory :clusters_applications_prometheus, class: 'Clusters::Applications::Prometheus' do
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
+
+ trait :no_helm_installed do
+ cluster factory: %i(cluster provided_by_gcp)
+ end
end
factory :clusters_applications_runner, class: 'Clusters::Applications::Runner' do
runner factory: %i(ci_runner)
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
+
+ trait :no_helm_installed do
+ cluster factory: %i(cluster provided_by_gcp)
+ end
end
factory :clusters_applications_knative, class: 'Clusters::Applications::Knative' do
hostname { 'example.com' }
cluster factory: %i(cluster with_installed_helm provided_by_gcp)
+
+ trait :no_helm_installed do
+ cluster factory: %i(cluster provided_by_gcp)
+ end
end
factory :clusters_applications_jupyter, class: 'Clusters::Applications::Jupyter' do
oauth_application factory: :oauth_application
cluster factory: %i(cluster with_installed_helm provided_by_gcp project)
+
+ trait :no_helm_installed do
+ cluster factory: %i(cluster provided_by_gcp)
+ end
end
end
end
diff --git a/spec/factories/serverless/domain.rb b/spec/factories/serverless/domain.rb
new file mode 100644
index 00000000000..7a6a048fb34
--- /dev/null
+++ b/spec/factories/serverless/domain.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+FactoryBot.define do
+ factory :serverless_domain, class: '::Serverless::Domain' do
+ function_name { 'test-function' }
+ serverless_domain_cluster { create(:serverless_domain_cluster) }
+ environment { create(:environment) }
+
+ skip_create
+ end
+end