Commit 446af723 authored by Thong Kuah's avatar Thong Kuah

Convert the #install_command spec to promethus#install_command as the subject

This makes this consistent with the specs for other applications as
well as fixing a bug in the 'application failed to install previously'
spec
parent 6343964b
...@@ -154,20 +154,17 @@ describe Clusters::Applications::Prometheus do ...@@ -154,20 +154,17 @@ describe Clusters::Applications::Prometheus do
end end
describe '#install_command' do describe '#install_command' do
let(:kubeclient) { double('kubernetes client') }
let(:prometheus) { create(:clusters_applications_prometheus) } let(:prometheus) { create(:clusters_applications_prometheus) }
it 'returns an instance of Gitlab::Kubernetes::Helm::InstallCommand' do subject { prometheus.install_command }
expect(prometheus.install_command).to be_an_instance_of(Gitlab::Kubernetes::Helm::InstallCommand)
end
it 'should be initialized with 3 arguments' do it { is_expected.to be_an_instance_of(Gitlab::Kubernetes::Helm::InstallCommand) }
command = prometheus.install_command
expect(command.name).to eq('prometheus') it 'should be initialized with 3 arguments' do
expect(command.chart).to eq('stable/prometheus') expect(subject.name).to eq('prometheus')
expect(command.version).to eq('6.7.3') expect(subject.chart).to eq('stable/prometheus')
expect(command.files).to eq(prometheus.files) expect(subject.version).to eq('6.7.3')
expect(subject.files).to eq(prometheus.files)
end end
context 'application failed to install previously' do context 'application failed to install previously' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment