diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/models/clusters/applications | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) | |
download | gitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/models/clusters/applications')
11 files changed, 41 insertions, 10 deletions
diff --git a/spec/models/clusters/applications/cert_manager_spec.rb b/spec/models/clusters/applications/cert_manager_spec.rb index d7fd0d06b05..7ca7f533a27 100644 --- a/spec/models/clusters/applications/cert_manager_spec.rb +++ b/spec/models/clusters/applications/cert_manager_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::CertManager do +RSpec.describe Clusters::Applications::CertManager do let(:cert_manager) { create(:clusters_applications_cert_manager) } include_examples 'cluster application core specs', :clusters_applications_cert_manager diff --git a/spec/models/clusters/applications/cilium_spec.rb b/spec/models/clusters/applications/cilium_spec.rb new file mode 100644 index 00000000000..8b01502d5c0 --- /dev/null +++ b/spec/models/clusters/applications/cilium_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Clusters::Applications::Cilium do + let(:cilium) { create(:clusters_applications_cilium) } + + include_examples 'cluster application core specs', :clusters_applications_cilium + include_examples 'cluster application status specs', :clusters_applications_cilium + include_examples 'cluster application initial status specs' + + describe '#allowed_to_uninstall?' do + subject { cilium.allowed_to_uninstall? } + + it { is_expected.to be false } + end +end diff --git a/spec/models/clusters/applications/crossplane_spec.rb b/spec/models/clusters/applications/crossplane_spec.rb index ebc675497f4..a41c5f6586b 100644 --- a/spec/models/clusters/applications/crossplane_spec.rb +++ b/spec/models/clusters/applications/crossplane_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::Crossplane do +RSpec.describe Clusters::Applications::Crossplane do let(:crossplane) { create(:clusters_applications_crossplane) } include_examples 'cluster application core specs', :clusters_applications_crossplane diff --git a/spec/models/clusters/applications/elastic_stack_spec.rb b/spec/models/clusters/applications/elastic_stack_spec.rb index 50042a4e29a..62123ffa542 100644 --- a/spec/models/clusters/applications/elastic_stack_spec.rb +++ b/spec/models/clusters/applications/elastic_stack_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::ElasticStack do +RSpec.describe Clusters::Applications::ElasticStack do include KubernetesHelpers include_examples 'cluster application core specs', :clusters_applications_elastic_stack @@ -27,6 +27,20 @@ describe Clusters::Applications::ElasticStack do expect(subject.preinstall).to be_empty end + context 'within values.yaml' do + let(:values_yaml_content) {subject.files[:"values.yaml"]} + + it 'contains the disabled index lifecycle management' do + expect(values_yaml_content).to include "setup.ilm.enabled: false" + end + + it 'contains daily indices with respective template' do + expect(values_yaml_content).to include "index: \"filebeat-%{[agent.version]}-%{+yyyy.MM.dd}\"" + expect(values_yaml_content).to include "setup.template.name: 'filebeat'" + expect(values_yaml_content).to include "setup.template.pattern: 'filebeat-*'" + end + end + context 'on a non rbac enabled cluster' do before do elastic_stack.cluster.platform_kubernetes.abac! diff --git a/spec/models/clusters/applications/fluentd_spec.rb b/spec/models/clusters/applications/fluentd_spec.rb index 4e9548990ed..be7b4a87947 100644 --- a/spec/models/clusters/applications/fluentd_spec.rb +++ b/spec/models/clusters/applications/fluentd_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::Fluentd do +RSpec.describe Clusters::Applications::Fluentd do let(:waf_log_enabled) { true } let(:cilium_log_enabled) { true } let(:fluentd) { create(:clusters_applications_fluentd, waf_log_enabled: waf_log_enabled, cilium_log_enabled: cilium_log_enabled) } diff --git a/spec/models/clusters/applications/helm_spec.rb b/spec/models/clusters/applications/helm_spec.rb index 87454e1d3e2..6d2ecaa6d47 100644 --- a/spec/models/clusters/applications/helm_spec.rb +++ b/spec/models/clusters/applications/helm_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::Helm do +RSpec.describe Clusters::Applications::Helm do include_examples 'cluster application core specs', :clusters_applications_helm describe '.available' do diff --git a/spec/models/clusters/applications/ingress_spec.rb b/spec/models/clusters/applications/ingress_spec.rb index 8aee4eec0d3..d1138f5fa2d 100644 --- a/spec/models/clusters/applications/ingress_spec.rb +++ b/spec/models/clusters/applications/ingress_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::Ingress do +RSpec.describe Clusters::Applications::Ingress do let(:ingress) { create(:clusters_applications_ingress) } it_behaves_like 'having unique enum values' diff --git a/spec/models/clusters/applications/jupyter_spec.rb b/spec/models/clusters/applications/jupyter_spec.rb index 937db9217f3..3cf24f1a9ef 100644 --- a/spec/models/clusters/applications/jupyter_spec.rb +++ b/spec/models/clusters/applications/jupyter_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::Jupyter do +RSpec.describe Clusters::Applications::Jupyter do include_examples 'cluster application core specs', :clusters_applications_jupyter include_examples 'cluster application status specs', :clusters_applications_jupyter include_examples 'cluster application version specs', :clusters_applications_jupyter diff --git a/spec/models/clusters/applications/knative_spec.rb b/spec/models/clusters/applications/knative_spec.rb index 7ff7644e703..b14161ce8e6 100644 --- a/spec/models/clusters/applications/knative_spec.rb +++ b/spec/models/clusters/applications/knative_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::Knative do +RSpec.describe Clusters::Applications::Knative do let(:knative) { create(:clusters_applications_knative) } include_examples 'cluster application core specs', :clusters_applications_knative diff --git a/spec/models/clusters/applications/prometheus_spec.rb b/spec/models/clusters/applications/prometheus_spec.rb index 1ed9e207b6b..1215b38a9a2 100644 --- a/spec/models/clusters/applications/prometheus_spec.rb +++ b/spec/models/clusters/applications/prometheus_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::Prometheus do +RSpec.describe Clusters::Applications::Prometheus do include KubernetesHelpers include StubRequests diff --git a/spec/models/clusters/applications/runner_spec.rb b/spec/models/clusters/applications/runner_spec.rb index 6ee6711ec4b..fbabfd25b2f 100644 --- a/spec/models/clusters/applications/runner_spec.rb +++ b/spec/models/clusters/applications/runner_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Clusters::Applications::Runner do +RSpec.describe Clusters::Applications::Runner do let(:ci_runner) { create(:ci_runner) } include_examples 'cluster application core specs', :clusters_applications_runner |