summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-07-01 20:24:20 +1200
committerThong Kuah <tkuah@gitlab.com>2019-07-08 09:13:21 +1200
commit1668f40f430c656ed9c20898605db21a66cb5937 (patch)
treed26ae7edb98df825116cd767dd1f85f2c5a452a6 /spec
parent72339077f7d79eeb9d0612c55236aa4aa6da4084 (diff)
downloadgitlab-ce-1668f40f430c656ed9c20898605db21a66cb5937.tar.gz
Remove fallback to project.deployment_platform
This improves query performance of MergeRequestsController#ci_environments_status a lot. However this means old deployments that deployed to kubernetes clusters with prometheus installations will no longer show performance metrics as we cannot backfill cluster_id from deployment_platform with certainty (clusters may be edited/added/deleted, which changes the results of deployment_platform).
Diffstat (limited to 'spec')
-rw-r--r--spec/models/deployment_spec.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb
index 713fb647708..a926e1913a7 100644
--- a/spec/models/deployment_spec.rb
+++ b/spec/models/deployment_spec.rb
@@ -341,18 +341,6 @@ describe Deployment 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