Spec: applications not yet installed doesn't count
We should not consider an application that is not yet installed or where the install errored as available. Write a spec to assert this
This commit is contained in:
parent
9eeca2db6d
commit
4e5494081e
|
@ -22,6 +22,14 @@ describe Prometheus::AdapterService do
|
|||
context "prometheus service can't execute queries" do
|
||||
let(:prometheus_service) { double(:prometheus_service, can_query?: false) }
|
||||
|
||||
context 'with cluster with prometheus not yet installed' do
|
||||
let!(:prometheus) { create(:clusters_applications_prometheus, :installable, cluster: cluster) }
|
||||
|
||||
it 'returns nil' do
|
||||
expect(subject.prometheus_adapter).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
context 'with cluster with prometheus installed' do
|
||||
let!(:prometheus) { create(:clusters_applications_prometheus, :installed, cluster: cluster) }
|
||||
|
||||
|
|
Loading…
Reference in New Issue