Commit 35a81d13 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Rename path_with_namespace -> disk_path (EE)

parent 289a164b
...@@ -21,9 +21,9 @@ class GeoRepositoryDestroyWorker ...@@ -21,9 +21,9 @@ class GeoRepositoryDestroyWorker
# we need to probe on all existing ones. # we need to probe on all existing ones.
# #
# if we don't find it means it has already been deleted and we just return # if we don't find it means it has already been deleted and we just return
def probe_repository_storage(full_path) def probe_repository_storage(repo_path)
Gitlab.config.repositories.storages.each do |repository_storage, rs_data| Gitlab.config.repositories.storages.each do |repository_storage, rs_data|
return repository_storage if gitlab_shell.exists?(rs_data['path'], full_path + '.git') return repository_storage if gitlab_shell.exists?(rs_data['path'], repo_path + '.git')
end end
nil nil
......
...@@ -6,8 +6,8 @@ describe Projects::DestroyService do ...@@ -6,8 +6,8 @@ describe Projects::DestroyService do
let!(:project) { create(:project, :repository, namespace: user.namespace) } let!(:project) { create(:project, :repository, namespace: user.namespace) }
let!(:project_id) { project.id } let!(:project_id) { project.id }
let!(:project_name) { project.name } let!(:project_name) { project.name }
let!(:project_path) { project.path_with_namespace } let!(:project_path) { project.disk_path }
let!(:wiki_path) { project.path_with_namespace + '.wiki' } let!(:wiki_path) { project.disk_path + '.wiki' }
let!(:storage_name) { project.repository_storage } let!(:storage_name) { project.repository_storage }
let!(:storage_path) { project.repository_storage_path } let!(:storage_path) { project.repository_storage_path }
......
...@@ -29,7 +29,7 @@ describe GeoRepositoryDestroyWorker do ...@@ -29,7 +29,7 @@ describe GeoRepositoryDestroyWorker do
describe '#probe_repository_storage' do describe '#probe_repository_storage' do
it 'returns a repository_storage when repository can be found' do it 'returns a repository_storage when repository can be found' do
expect(subject.send(:probe_repository_storage, project.path_with_namespace)).to eq('default') expect(subject.send(:probe_repository_storage, project.full_path)).to eq('default')
end end
it 'returns nil when repository cannot be found in any existing repository_storage' do it 'returns nil when repository cannot be found in any existing repository_storage' do
......
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