Commit 4e549408 authored by Thong Kuah's avatar Thong Kuah

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
parent 9eeca2db
......@@ -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) }
......
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