From 41f87e9e99e14f7d591f222b0246467acd040625 Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Thu, 25 Jul 2019 16:31:53 +1200 Subject: Removes potentially incorrect, and slow fallback Deployment_platform is relatively expensive and calling this after the fact means that this may not be the cluster that was deployed to. Correspondingly reduce the leeway given in the related N+1 spec --- spec/models/deployment_metrics_spec.rb | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'spec/models/deployment_metrics_spec.rb') diff --git a/spec/models/deployment_metrics_spec.rb b/spec/models/deployment_metrics_spec.rb index 0aadb1f3a5e..7c574a8b6c8 100644 --- a/spec/models/deployment_metrics_spec.rb +++ b/spec/models/deployment_metrics_spec.rb @@ -49,18 +49,6 @@ 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 -- cgit v1.2.1