Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2f951872
Commit
2f951872
authored
Aug 04, 2020
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Gitlab::Geo::Fdw.gitlab_schema_tables_count method
parent
a4fc4b3f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
18 deletions
+0
-18
ee/lib/gitlab/geo/fdw.rb
ee/lib/gitlab/geo/fdw.rb
+0
-4
ee/spec/lib/gitlab/geo/fdw_spec.rb
ee/spec/lib/gitlab/geo/fdw_spec.rb
+0
-14
No files found.
ee/lib/gitlab/geo/fdw.rb
View file @
2f951872
...
...
@@ -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
...
...
ee/spec/lib/gitlab/geo/fdw_spec.rb
View file @
2f951872
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment