Commit e6442cb3 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'leaky-constant-fix-13' into 'master'

Fix leaky constant in statistics api spec

See merge request gitlab-org/gitlab!32042
parents 6c31ca7d b8ecb7bc
......@@ -390,7 +390,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/models/tree_spec.rb'
- 'spec/policies/merge_request_policy_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/serializers/commit_entity_spec.rb'
- 'spec/services/clusters/applications/check_installation_progress_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'
describe API::Statistics, 'Statistics' do
include ProjectForksHelper
TABLES_TO_ANALYZE = %w[
tables_to_analyze = %w[
projects
users
namespaces
......@@ -62,7 +62,7 @@ describe API::Statistics, 'Statistics' do
# Make sure the reltuples have been updated
# 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}")
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