Commit 42f550e4 authored by Nick Thomas's avatar Nick Thomas

Merge branch '5178-geo-verification-repository-path-cleanup' into 'master'

Geo - Cleanup repository path implementation

Closes #5178

See merge request gitlab-org/gitlab-ee!5082
parents 82cd5c4a a3eed5ee
......@@ -60,17 +60,6 @@ class Geo::ProjectRegistry < Geo::BaseRegistry
project.wiki_enabled? && (never_synced_wiki? || wiki_sync_needed?(scheduled_time))
end
def repository_path(type)
repo_path = project.disk_path
case type
when :repository
repo_path
when :wiki
"#{repo_path}.wiki"
end
end
private
def never_synced_repository?
......
......@@ -73,7 +73,12 @@ module Geo
end
def repository_path
registry.repository_path(type)
case type
when :repository
registry.project.disk_path
when :wiki
registry.project.wiki.disk_path
end
end
def path_to_repo
......
......@@ -12,7 +12,7 @@ describe Geo::RepositoryVerifySecondaryService, :geo do
shared_examples 'verify checksums for repositories/wikis' do |type|
let(:checksum) { instance_double('Gitlab::Git::Checksum') }
let(:storage) { project.repository_storage }
let(:relative_path) { registry.repository_path(type) }
let(:relative_path) { service.send(:repository_path) }
subject(:service) { described_class.new(registry, type) }
......
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