summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-01-31 12:21:03 +1300
committerThong Kuah <tkuah@gitlab.com>2019-02-06 22:39:38 +1300
commit8ef1128f672266c789fc135500e1287ab389bb16 (patch)
tree64c843618e874d4b87e775a886d0d215f67c78c9 /spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
parentbc5a2ed8c6548f6a46255ff82460cab8315e85ac (diff)
downloadgitlab-ce-8ef1128f672266c789fc135500e1287ab389bb16.tar.gz
Update version column after application is updated
Note: updating version column after :updating is not ideal in the updating -> update_erroed case. This will mean that the application now records the version as the version that failed to upgrade, not the version that it is currently on.
Diffstat (limited to 'spec/support/shared_examples/models/cluster_application_status_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/models/cluster_application_status_shared_examples.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb b/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
index c391cc48f4e..bd12d94b2c2 100644
--- a/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
+++ b/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
@@ -78,6 +78,16 @@ shared_examples 'cluster application status specs' do |application_name|
expect(subject.cluster.application_helm.version).to eq(Gitlab::Kubernetes::Helm::HELM_VERSION)
end
+
+ it 'updates the version for the application' do
+ subject.update!(version: '0.0.0')
+
+ subject.make_updated!
+
+ subject.reload
+
+ expect(subject.version).to eq(subject.class.const_get(:VERSION))
+ end
end
describe '#make_errored' do