diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-03-01 23:46:02 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-03-01 23:46:02 +0000 |
commit | c607008ee55e35465e04a938a341f2f24cb6761f (patch) | |
tree | 5fbabbeec70c9129b5db9b184d7620dbc35aaac2 /spec/models/clusters/applications/ingress_spec.rb | |
parent | 947a7f858765fdbad2f4084bed24994329d62337 (diff) | |
download | gitlab-ce-c607008ee55e35465e04a938a341f2f24cb6761f.tar.gz |
Extend Cluster Applications to install GitLab Runner to Kubernetes cluster
Diffstat (limited to 'spec/models/clusters/applications/ingress_spec.rb')
-rw-r--r-- | spec/models/clusters/applications/ingress_spec.rb | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/spec/models/clusters/applications/ingress_spec.rb b/spec/models/clusters/applications/ingress_spec.rb index a34f4ff2b48..03f5b88a525 100644 --- a/spec/models/clusters/applications/ingress_spec.rb +++ b/spec/models/clusters/applications/ingress_spec.rb @@ -1,16 +1,16 @@ require 'rails_helper' describe Clusters::Applications::Ingress do - it { is_expected.to belong_to(:cluster) } - it { is_expected.to validate_presence_of(:cluster) } + let(:ingress) { create(:clusters_applications_ingress) } + + include_examples 'cluster application core specs', :clusters_applications_ingress + include_examples 'cluster application status specs', :cluster_application_ingress before do allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_in) allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_async) end - include_examples 'cluster application specs', described_class - describe '#make_installed!' do before do application.make_installed! @@ -52,4 +52,27 @@ describe Clusters::Applications::Ingress do end end end + + describe '#install_command' do + subject { ingress.install_command } + + it { is_expected.to be_an_instance_of(Gitlab::Kubernetes::Helm::InstallCommand) } + + it 'should be initialized with ingress arguments' do + expect(subject.name).to eq('ingress') + expect(subject.chart).to eq('stable/nginx-ingress') + expect(subject.values).to eq(ingress.values) + end + end + + describe '#values' do + subject { ingress.values } + + it 'should include ingress valid keys' do + is_expected.to include('image') + is_expected.to include('repository') + is_expected.to include('stats') + is_expected.to include('podAnnotations') + end + end end |