summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-11-07 15:10:40 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-11-07 15:10:40 +0100
commit389c9bfc516531f850d6fe4098db0572f90478ab (patch)
treec947afc402b4339e1d0909c912fe80dcf4452da6 /spec/factories
parente40021cd3cba0a889f43fcfec7b25c757391f11c (diff)
downloadgitlab-ce-389c9bfc516531f850d6fe4098db0572f90478ab.tar.gz
Add specs for ingress
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/clusters/applications/ingress.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/factories/clusters/applications/ingress.rb b/spec/factories/clusters/applications/ingress.rb
new file mode 100644
index 00000000000..63016d9c15c
--- /dev/null
+++ b/spec/factories/clusters/applications/ingress.rb
@@ -0,0 +1,35 @@
+FactoryGirl.define do
+ factory :cluster_applications_ingress, class: Clusters::Applications::Ingress 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
+
+ trait :errored do
+ status(-1)
+ status_reason 'something went wrong'
+ end
+
+ trait :timeouted do
+ installing
+ updated_at ClusterWaitForAppInstallationWorker::TIMEOUT.ago
+ end
+ end
+end