Commit a3eed5ee authored by Brett Walker's avatar Brett Walker

cleanup 'repository_path' implementation

parent 4c0e8125
......@@ -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