parent
44eec56834
commit
43c284b711
|
@ -47,6 +47,14 @@ module Clusters
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def uninstall_command
|
||||||
|
Gitlab::Kubernetes::Helm::DeleteCommand.new(
|
||||||
|
name: name,
|
||||||
|
rbac: cluster.platform_kubernetes_rbac?,
|
||||||
|
files: files
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def upgrade_command(values)
|
def upgrade_command(values)
|
||||||
::Gitlab::Kubernetes::Helm::InstallCommand.new(
|
::Gitlab::Kubernetes::Helm::InstallCommand.new(
|
||||||
name: name,
|
name: name,
|
||||||
|
|
|
@ -142,6 +142,34 @@ describe Clusters::Applications::Prometheus do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#uninstall_command' do
|
||||||
|
let(:prometheus) { create(:clusters_applications_prometheus) }
|
||||||
|
|
||||||
|
subject { prometheus.uninstall_command }
|
||||||
|
|
||||||
|
it { is_expected.to be_an_instance_of(Gitlab::Kubernetes::Helm::DeleteCommand) }
|
||||||
|
|
||||||
|
it 'has the application name' do
|
||||||
|
expect(subject.name).to eq('prometheus')
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'has files' do
|
||||||
|
expect(subject.files).to eq(prometheus.files)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'is rbac' do
|
||||||
|
expect(subject).to be_rbac
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'on a non rbac enabled cluster' do
|
||||||
|
before do
|
||||||
|
prometheus.cluster.platform_kubernetes.abac!
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.not_to be_rbac }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#upgrade_command' do
|
describe '#upgrade_command' do
|
||||||
let(:prometheus) { build(:clusters_applications_prometheus) }
|
let(:prometheus) { build(:clusters_applications_prometheus) }
|
||||||
let(:values) { prometheus.values }
|
let(:values) { prometheus.values }
|
||||||
|
|
Loading…
Reference in New Issue