Commit b7bd7f5b authored by Stan Hu's avatar Stan Hu

Merge branch '223104-project-registry-status-finder-remove-unused-methods' into 'master'

Geo - Remove unused methods from Geo::ProjectRegistryStatusFinder

See merge request gitlab-org/gitlab!40319
parents b86db507 8fd5296f
......@@ -6,7 +6,7 @@ module Geo
# This finders works slightly different than the ones used to trigger
# synchronization, as we are concerned in filtering for displaying rather then
# filtering for processing.
class ProjectRegistryStatusFinder < RegistryFinder
class ProjectRegistryStatusFinder
# Returns all project registry
#
def all_projects
......@@ -70,16 +70,6 @@ module Geo
end
# rubocop: enable CodeReuse/ActiveRecord
# Return any project registry that has never been fully synced
#
# We don't include projects without a corresponding ProjectRegistry
# for performance reasons.
# rubocop: disable CodeReuse/ActiveRecord
def never_synced_projects
Geo::ProjectRegistry.where(last_repository_successful_sync_at: nil).with_routes
end
# rubocop: enable CodeReuse/ActiveRecord
private
def project_registry
......
......@@ -65,15 +65,4 @@ RSpec.describe Geo::ProjectRegistryStatusFinder, :geo, :geo_tracking_db do
)
end
end
describe '#never_synced_projects' do
it 'returns only never fully synced registries' do
result = subject.never_synced_projects
expect(result).to contain_exactly(
never_synced_registry,
never_synced_registry_with_failure
)
end
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