diff options
Diffstat (limited to 'spec/services/clusters/applications/create_service_spec.rb')
-rw-r--r-- | spec/services/clusters/applications/create_service_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/services/clusters/applications/create_service_spec.rb b/spec/services/clusters/applications/create_service_spec.rb index 8dd573c3698..bdacb9ce071 100644 --- a/spec/services/clusters/applications/create_service_spec.rb +++ b/spec/services/clusters/applications/create_service_spec.rb @@ -132,6 +132,34 @@ describe Clusters::Applications::CreateService do expect(subject.hostname).to eq('example.com') end end + + context 'elastic stack application' do + let(:params) do + { + application: 'elastic_stack', + kibana_hostname: 'example.com' + } + end + + before do + create(:clusters_applications_ingress, :installed, external_ip: "127.0.0.0", cluster: cluster) + expect_any_instance_of(Clusters::Applications::ElasticStack) + .to receive(:make_scheduled!) + .and_call_original + end + + it 'creates the application' do + expect do + subject + + cluster.reload + end.to change(cluster, :application_elastic_stack) + end + + it 'sets the kibana_hostname' do + expect(subject.kibana_hostname).to eq('example.com') + end + end end context 'invalid application' do |