summaryrefslogtreecommitdiff
path: root/spec/factories/clusters
diff options
context:
space:
mode:
authorAlessio Caiazza <acaiazza@gitlab.com>2017-11-03 19:20:29 +0100
committerAlessio Caiazza <acaiazza@gitlab.com>2017-11-03 19:20:29 +0100
commitc6c9b37b1d1c9304b0eef530adb4d32178adae16 (patch)
tree5daf2d4220c36401c471550d18b0e397e602bcdb /spec/factories/clusters
parentc0299ce49406302a26e7fd16ec272bca19715afb (diff)
downloadgitlab-ce-c6c9b37b1d1c9304b0eef530adb4d32178adae16.tar.gz
Add Clusters::Applications::Helm tests
Diffstat (limited to 'spec/factories/clusters')
-rw-r--r--spec/factories/clusters/applications/helm.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/factories/clusters/applications/helm.rb b/spec/factories/clusters/applications/helm.rb
new file mode 100644
index 00000000000..968a6a1a007
--- /dev/null
+++ b/spec/factories/clusters/applications/helm.rb
@@ -0,0 +1,35 @@
+FactoryGirl.define do
+ factory :applications_helm, class: Clusters::Applications::Helm do
+ trait :cluster do
+ before(:create) do |app, _|
+ app.cluster = create(:cluster)
+ end
+ end
+
+ trait :installable do
+ cluster
+ status 0
+ end
+
+ trait :scheduled do
+ cluster
+ status 1
+ end
+
+ trait :installing do
+ cluster
+ status 2
+ end
+
+ trait :installed do
+ cluster
+ status 3
+ end
+
+ trait :errored do
+ cluster
+ status(-1)
+ status_reason 'something went wrong'
+ end
+ end
+end