blob: 7e9680b0ab44e3c3099f880ea203fd73765dd087 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
|