Commit b8ecb7bc authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Fix leaky constant in statistics api spec

parent d194f3dc
...@@ -390,7 +390,6 @@ RSpec/LeakyConstantDeclaration: ...@@ -390,7 +390,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/models/tree_spec.rb' - 'spec/models/tree_spec.rb'
- 'spec/policies/merge_request_policy_spec.rb' - 'spec/policies/merge_request_policy_spec.rb'
- 'spec/requests/api/graphql/tasks/task_completion_status_spec.rb' - 'spec/requests/api/graphql/tasks/task_completion_status_spec.rb'
- 'spec/requests/api/statistics_spec.rb'
- 'spec/rubocop/cop/rspec/env_assignment_spec.rb' - 'spec/rubocop/cop/rspec/env_assignment_spec.rb'
- 'spec/serializers/commit_entity_spec.rb' - 'spec/serializers/commit_entity_spec.rb'
- 'spec/services/ci/retry_build_service_spec.rb' - 'spec/services/ci/retry_build_service_spec.rb'
......
---
title: Fix leaky constant issue in statistics api spec
merge_request: 32042
author: Rajendra Kadam
type: fixed
...@@ -4,7 +4,7 @@ require 'spec_helper' ...@@ -4,7 +4,7 @@ require 'spec_helper'
describe API::Statistics, 'Statistics' do describe API::Statistics, 'Statistics' do
include ProjectForksHelper include ProjectForksHelper
TABLES_TO_ANALYZE = %w[ tables_to_analyze = %w[
projects projects
users users
namespaces namespaces
...@@ -62,7 +62,7 @@ describe API::Statistics, 'Statistics' do ...@@ -62,7 +62,7 @@ describe API::Statistics, 'Statistics' do
# Make sure the reltuples have been updated # Make sure the reltuples have been updated
# to get a correct count on postgresql # to get a correct count on postgresql
TABLES_TO_ANALYZE.each do |table| tables_to_analyze.each do |table|
ActiveRecord::Base.connection.execute("ANALYZE #{table}") ActiveRecord::Base.connection.execute("ANALYZE #{table}")
end end
......
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