Remove Gitlab::Geo::Fdw.gitlab_schema_tables_count method

parent a4fc4b3f
......@@ -56,10 +56,6 @@ module Gitlab
end
end
def gitlab_schema_tables_count
ActiveRecord::Schema.tables.reject { |table| table.start_with?('pg_') }.count
end
def expire_cache!
Gitlab::Geo.expire_cache_keys!(CACHE_KEYS)
end
......
......@@ -138,20 +138,6 @@ RSpec.describe Gitlab::Geo::Fdw, :geo do
end
end
describe '.gitlab_schema_tables_count' do
it 'returns the same number of tables as defined in the database' do
expect(described_class.gitlab_schema_tables_count).to eq(ActiveRecord::Schema.tables.count)
end
it 'excludes tables that start with `pg_`' do
ActiveRecord::Base.connection.create_table(:pg_gitlab_test)
expect(described_class.gitlab_schema_tables_count).to eq(ActiveRecord::Schema.tables.count - 1)
ActiveRecord::Base.connection.drop_table(:pg_gitlab_test)
end
end
describe '.expire_cache!' do
it 'calls Gitlab::Geo.expire_cache_keys!' do
expect(Gitlab::Geo).to receive(:expire_cache_keys!).with(Gitlab::Geo::Fdw::CACHE_KEYS)
......
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