diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-01-31 12:59:26 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-02-07 00:07:49 +1300 |
commit | e72f24d27be911ffce943929b7ca2f6df7051083 (patch) | |
tree | 65aecff19acc8b833f158f94e33d1771a45e721d /spec/support/shared_examples/models/cluster_application_status_shared_examples.rb | |
parent | 8ef1128f672266c789fc135500e1287ab389bb16 (diff) | |
download | gitlab-ce-e72f24d27be911ffce943929b7ca2f6df7051083.tar.gz |
Update version on :installed, not :installing
This makes this consistent with :updated. And also avoids a potential
issue where an install errors which means that that the recorded version
won't necessarily reflect the version that is actually installed.
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.rb | 14 |
1 files changed, 14 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 bd12d94b2c2..af6147bed39 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 @@ -21,6 +21,10 @@ shared_examples 'cluster application status specs' do |application_name| context 'when application is scheduled' do before do create(:clusters_applications_helm, :installed, cluster: cluster) + + if described_class == Clusters::Applications::Jupyter + create(:clusters_applications_ingress, :installed, external_ip: '127.0.0.1', cluster: cluster) + end end it 'sets a default status' do @@ -58,6 +62,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 'sets the correct version of the application' do + subject.update!(version: '0.0.0') + + subject.make_installed! + + subject.reload + + expect(subject.version).to eq(subject.class.const_get(:VERSION)) + end end describe '#make_updated' do |