diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-04-08 04:26:05 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-04-30 08:55:11 +0300 |
commit | 43be4d54f3940633ad76e746a9a999c4a9a65870 (patch) | |
tree | d228ccff7188ad16d20a16802eb71acac7d85d75 /spec/factories/clusters | |
parent | a2543ee29a97f61f960994d473291c7224c50c3d (diff) |
Define state transitions for uninstalling apps
Added :uninstalled state as wasn't sure if we should be destroying the
cluster apps
Diffstat (limited to 'spec/factories/clusters')
-rw-r--r-- | spec/factories/clusters/applications/helm.rb | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/spec/factories/clusters/applications/helm.rb b/spec/factories/clusters/applications/helm.rb index fe56ac5b71d..ac230950fce 100644 --- a/spec/factories/clusters/applications/helm.rb +++ b/spec/factories/clusters/applications/helm.rb @@ -6,6 +6,11 @@ FactoryBot.define do status(-2) end + trait :errored do + status(-1) + status_reason 'something went wrong' + end + trait :installable do status 0 end @@ -30,16 +35,24 @@ FactoryBot.define do status 5 end - trait :errored do - status(-1) + trait :update_errored do + status(6) status_reason 'something went wrong' end - trait :update_errored do - status(6) + trait :uninstalling do + status 7 + end + + trait :uninstall_errored do + status(8) status_reason 'something went wrong' end + trait :uninstalled do + status 9 + end + trait :timeouted do installing updated_at { ClusterWaitForAppInstallationWorker::TIMEOUT.ago } |