summaryrefslogtreecommitdiff
path: root/spec/models/clusters/applications/elastic_stack_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-21 14:21:10 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-21 14:21:10 +0000
commitcb0d23c455b73486fd1015f8ca9479b5b7e3585d (patch)
treed7dc129a407fd74266d2dc561bebf24665197c2f /spec/models/clusters/applications/elastic_stack_spec.rb
parentc3e911be175c0aabfea1eb030f9e0ef23f5f3887 (diff)
downloadgitlab-ce-cb0d23c455b73486fd1015f8ca9479b5b7e3585d.tar.gz
Add latest changes from gitlab-org/gitlab@12-7-stable-ee
Diffstat (limited to 'spec/models/clusters/applications/elastic_stack_spec.rb')
-rw-r--r--spec/models/clusters/applications/elastic_stack_spec.rb56
1 files changed, 3 insertions, 53 deletions
diff --git a/spec/models/clusters/applications/elastic_stack_spec.rb b/spec/models/clusters/applications/elastic_stack_spec.rb
index d0e0dd5ad57..d336dc752c8 100644
--- a/spec/models/clusters/applications/elastic_stack_spec.rb
+++ b/spec/models/clusters/applications/elastic_stack_spec.rb
@@ -10,45 +10,8 @@ describe Clusters::Applications::ElasticStack do
include_examples 'cluster application version specs', :clusters_applications_elastic_stack
include_examples 'cluster application helm specs', :clusters_applications_elastic_stack
- describe '#can_uninstall?' do
- let(:ingress) { create(:clusters_applications_ingress, :installed, external_hostname: 'localhost.localdomain') }
- let(:elastic_stack) { create(:clusters_applications_elastic_stack, cluster: ingress.cluster) }
-
- subject { elastic_stack.can_uninstall? }
-
- it { is_expected.to be_truthy }
- end
-
- describe '#set_initial_status' do
- before do
- elastic_stack.set_initial_status
- end
-
- context 'when ingress is not installed' do
- let(:cluster) { create(:cluster, :provided_by_gcp) }
- let(:elastic_stack) { create(:clusters_applications_elastic_stack, cluster: cluster) }
-
- it { expect(elastic_stack).to be_not_installable }
- end
-
- context 'when ingress is installed and external_ip is assigned' do
- let(:ingress) { create(:clusters_applications_ingress, :installed, external_ip: '127.0.0.1') }
- let(:elastic_stack) { create(:clusters_applications_elastic_stack, cluster: ingress.cluster) }
-
- it { expect(elastic_stack).to be_installable }
- end
-
- context 'when ingress is installed and external_hostname is assigned' do
- let(:ingress) { create(:clusters_applications_ingress, :installed, external_hostname: 'localhost.localdomain') }
- let(:elastic_stack) { create(:clusters_applications_elastic_stack, cluster: ingress.cluster) }
-
- it { expect(elastic_stack).to be_installable }
- end
- end
-
describe '#install_command' do
- let!(:ingress) { create(:clusters_applications_ingress, :installed, external_ip: '127.0.0.1') }
- let!(:elastic_stack) { create(:clusters_applications_elastic_stack, cluster: ingress.cluster) }
+ let!(:elastic_stack) { create(:clusters_applications_elastic_stack) }
subject { elastic_stack.install_command }
@@ -80,8 +43,7 @@ describe Clusters::Applications::ElasticStack do
end
describe '#uninstall_command' do
- let!(:ingress) { create(:clusters_applications_ingress, :installed, external_ip: '127.0.0.1') }
- let!(:elastic_stack) { create(:clusters_applications_elastic_stack, cluster: ingress.cluster) }
+ let!(:elastic_stack) { create(:clusters_applications_elastic_stack) }
subject { elastic_stack.uninstall_command }
@@ -100,19 +62,6 @@ describe Clusters::Applications::ElasticStack do
end
end
- describe '#files' do
- let!(:ingress) { create(:clusters_applications_ingress, :installed, external_ip: '127.0.0.1') }
- let!(:elastic_stack) { create(:clusters_applications_elastic_stack, cluster: ingress.cluster) }
-
- let(:values) { subject[:'values.yaml'] }
-
- subject { elastic_stack.files }
-
- it 'includes elastic stack specific keys in the values.yaml file' do
- expect(values).to include('ELASTICSEARCH_HOSTS')
- end
- end
-
describe '#elasticsearch_client' do
context 'cluster is nil' do
it 'returns nil' do
@@ -123,6 +72,7 @@ describe Clusters::Applications::ElasticStack do
context "cluster doesn't have kubeclient" do
let(:cluster) { create(:cluster) }
+
subject { create(:clusters_applications_elastic_stack, cluster: cluster) }
it 'returns nil' do