diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
commit | 983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch) | |
tree | b153cd387c14ba23bd5a07514c7c01fddf6a78a0 /spec/models/clusters/applications/fluentd_spec.rb | |
parent | a2bddee2cdb38673df0e004d5b32d9f77797de64 (diff) |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/models/clusters/applications/fluentd_spec.rb')
-rw-r--r-- | spec/models/clusters/applications/fluentd_spec.rb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/spec/models/clusters/applications/fluentd_spec.rb b/spec/models/clusters/applications/fluentd_spec.rb new file mode 100644 index 00000000000..7e9680b0ab4 --- /dev/null +++ b/spec/models/clusters/applications/fluentd_spec.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Clusters::Applications::Fluentd do + let(:fluentd) { create(:clusters_applications_fluentd) } + + include_examples 'cluster application core specs', :clusters_applications_fluentd + include_examples 'cluster application status specs', :clusters_applications_fluentd + include_examples 'cluster application version specs', :clusters_applications_fluentd + include_examples 'cluster application initial status specs' + + describe '#can_uninstall?' do + subject { fluentd.can_uninstall? } + + it { is_expected.to be true } + end + + describe '#install_command' do + subject { fluentd.install_command } + + it { is_expected.to be_an_instance_of(Gitlab::Kubernetes::Helm::InstallCommand) } + + it 'is initialized with fluentd arguments' do + expect(subject.name).to eq('fluentd') + expect(subject.chart).to eq('stable/fluentd') + expect(subject.version).to eq('2.4.0') + expect(subject).to be_rbac + end + + context 'application failed to install previously' do + let(:fluentd) { create(:clusters_applications_fluentd, :errored, version: '0.0.1') } + + it 'is initialized with the locked version' do + expect(subject.version).to eq('2.4.0') + end + end + end + + describe '#files' do + let(:application) { fluentd } + let(:values) { subject[:'values.yaml'] } + + subject { application.files } + + it 'includes fluentd specific keys in the values.yaml file' do + expect(values).to include('output.conf', 'general.conf') + end + end +end |