diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-03-07 15:43:34 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-03-07 15:43:34 +0300 |
commit | 5cea1e8b8007da95995cda682b5f0d96b0c7f10c (patch) | |
tree | 0932047faf723b571dc72887f8319f39d7ee0be8 /spec/models | |
parent | f8dc5f8d98ea46a73cc613d23fd55be57c98b748 (diff) | |
parent | c08beb5051224dbee52716b0fa9c4dd9fedad5ad (diff) |
Merge branch '56937-edit-knative-domain' into 'master'
Edit Knative domain after it has been deployed
Closes #56937
See merge request gitlab-org/gitlab-ce!25386
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/clusters/applications/knative_spec.rb | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/spec/models/clusters/applications/knative_spec.rb b/spec/models/clusters/applications/knative_spec.rb index 006b922ab27..4884a5927fb 100644 --- a/spec/models/clusters/applications/knative_spec.rb +++ b/spec/models/clusters/applications/knative_spec.rb @@ -66,9 +66,7 @@ describe Clusters::Applications::Knative do end end - describe '#install_command' do - subject { knative.install_command } - + shared_examples 'a command' do it 'should be an instance of Helm::InstallCommand' do expect(subject).to be_an_instance_of(Gitlab::Kubernetes::Helm::InstallCommand) end @@ -76,7 +74,6 @@ describe Clusters::Applications::Knative do it 'should be initialized with knative arguments' do expect(subject.name).to eq('knative') expect(subject.chart).to eq('knative/knative') - expect(subject.version).to eq('0.2.2') expect(subject.files).to eq(knative.files) end @@ -98,6 +95,27 @@ describe Clusters::Applications::Knative do end end + describe '#install_command' do + subject { knative.install_command } + + it 'should be initialized with latest version' do + expect(subject.version).to eq('0.2.2') + end + + it_behaves_like 'a command' + end + + describe '#update_command' do + let!(:current_installed_version) { knative.version = '0.1.0' } + subject { knative.update_command } + + it 'should be initialized with current version' do + expect(subject.version).to eq(current_installed_version) + end + + it_behaves_like 'a command' + end + describe '#files' do let(:application) { knative } let(:values) { subject[:'values.yaml'] } |