diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-07-04 08:26:37 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-07-08 00:14:37 +0300 |
commit | c85d6b0c744e9a971fafdf58328f907dfa0de127 (patch) | |
tree | 5d65b622c5bc40ec0cc0deb66be33edb660383a7 /spec/models/deployment_metrics_spec.rb | |
parent | 25ba11a2aad9571e4759cdc711199634e3392c5b (diff) |
Restore fallback to deployment_platform_cluster
In 12.2 we will remove this fallback.
Diffstat (limited to 'spec/models/deployment_metrics_spec.rb')
-rw-r--r-- | spec/models/deployment_metrics_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/deployment_metrics_spec.rb b/spec/models/deployment_metrics_spec.rb index 7c574a8b6c8..0aadb1f3a5e 100644 --- a/spec/models/deployment_metrics_spec.rb +++ b/spec/models/deployment_metrics_spec.rb @@ -49,6 +49,18 @@ describe DeploymentMetrics do it { is_expected.to be_truthy } end + + context 'fallback deployment platform' do + let(:cluster) { create(:cluster, :provided_by_user, environment_scope: '*', projects: [deployment.project]) } + let!(:prometheus) { create(:clusters_applications_prometheus, :installed, cluster: cluster) } + + before do + expect(deployment.project).to receive(:deployment_platform).and_return(cluster.platform) + expect(cluster.application_prometheus).to receive(:can_query?).and_return(true) + end + + it { is_expected.to be_truthy } + end end end |