Commit 8fe3fa13 authored by Gabriel Mazetto's avatar Gabriel Mazetto

More path_with_namespace -> full_path renames (EE)

parent 35a81d13
...@@ -8,7 +8,7 @@ module EE ...@@ -8,7 +8,7 @@ module EE
end end
def geo_primary_ssh_url_to_repo(project) def geo_primary_ssh_url_to_repo(project)
"#{::Gitlab::Geo.primary_node.clone_url_prefix}#{project.path_with_namespace}.git" "#{::Gitlab::Geo.primary_node.clone_url_prefix}#{project.full_path}.git"
end end
def geo_primary_http_url_to_repo(project) def geo_primary_http_url_to_repo(project)
......
...@@ -49,7 +49,7 @@ module Geo ...@@ -49,7 +49,7 @@ module Geo
message: message, message: message,
error: error, error: error,
project_id: project.id, project_id: project.id,
project_path: project.path_with_namespace) project_path: project.full_path)
end end
end end
end end
...@@ -27,7 +27,7 @@ module Geo ...@@ -27,7 +27,7 @@ module Geo
end end
def new_wiki_path_with_namespace def new_wiki_path_with_namespace
project.wiki.path_with_namespace project.wiki.full_path
end end
end end
end end
...@@ -33,7 +33,7 @@ module Geo ...@@ -33,7 +33,7 @@ module Geo
end end
def ssh_url_to_repo def ssh_url_to_repo
"#{primary_ssh_path_prefix}#{project.path_with_namespace}.git" "#{primary_ssh_path_prefix}#{project.full_path}.git"
end end
end end
end end
...@@ -26,7 +26,7 @@ module Geo ...@@ -26,7 +26,7 @@ module Geo
end end
def ssh_url_to_wiki def ssh_url_to_wiki
"#{primary_ssh_path_prefix}#{project.path_with_namespace}.wiki.git" "#{primary_ssh_path_prefix}#{project.full_path}.wiki.git"
end end
end end
end end
...@@ -18,7 +18,7 @@ module Gitlab ...@@ -18,7 +18,7 @@ module Gitlab
{ {
class: self.class.name, class: self.class.name,
project_id: project.id, project_id: project.id,
project_path: project.path_with_namespace, project_path: project.full_path,
message: message message: message
} }
end end
......
...@@ -72,7 +72,7 @@ describe Project, elastic: true do ...@@ -72,7 +72,7 @@ describe Project, elastic: true do
) )
expected_hash['name_with_namespace'] = project.name_with_namespace expected_hash['name_with_namespace'] = project.name_with_namespace
expected_hash['path_with_namespace'] = project.path_with_namespace expected_hash['path_with_namespace'] = project.full_path
expect(project.as_indexed_json).to eq(expected_hash) expect(project.as_indexed_json).to eq(expected_hash)
end end
......
...@@ -2,9 +2,9 @@ require 'spec_helper' ...@@ -2,9 +2,9 @@ require 'spec_helper'
describe Geo::MoveRepositoryService do describe Geo::MoveRepositoryService do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:new_path) { project.path_with_namespace + '+renamed' } let(:new_path) { project.full_path + '+renamed' }
let(:full_new_path) { File.join(project.repository_storage_path, new_path) } let(:full_new_path) { File.join(project.repository_storage_path, new_path) }
subject { described_class.new(project.id, project.name, project.path_with_namespace, new_path) } subject { described_class.new(project.id, project.name, project.full_path, new_path) }
describe '#execute' do describe '#execute' do
it 'renames the path' do it 'renames the path' do
......
...@@ -11,7 +11,7 @@ RSpec.describe Geo::RepositorySyncService do ...@@ -11,7 +11,7 @@ RSpec.describe Geo::RepositorySyncService do
describe '#execute' do describe '#execute' do
let(:project) { create(:project_empty_repo) } let(:project) { create(:project_empty_repo) }
let(:repository) { project.repository } let(:repository) { project.repository }
let(:url_to_repo) { "#{primary.clone_url_prefix}#{project.path_with_namespace}.git" } let(:url_to_repo) { "#{primary.clone_url_prefix}#{project.full_path}.git" }
before do before do
allow(Gitlab::ExclusiveLease).to receive(:new) allow(Gitlab::ExclusiveLease).to receive(:new)
...@@ -94,7 +94,7 @@ RSpec.describe Geo::RepositorySyncService do ...@@ -94,7 +94,7 @@ RSpec.describe Geo::RepositorySyncService do
context 'when repository sync fail' do context 'when repository sync fail' do
let(:registry) { Geo::ProjectRegistry.find_by(project_id: project.id) } let(:registry) { Geo::ProjectRegistry.find_by(project_id: project.id) }
let(:url_to_repo) { "#{primary.clone_url_prefix}#{project.path_with_namespace}.git" } let(:url_to_repo) { "#{primary.clone_url_prefix}#{project.full_path}.git" }
before do before do
allow(repository).to receive(:fetch_geo_mirror).with(url_to_repo) { raise Gitlab::Shell::Error } allow(repository).to receive(:fetch_geo_mirror).with(url_to_repo) { raise Gitlab::Shell::Error }
......
...@@ -11,7 +11,7 @@ RSpec.describe Geo::WikiSyncService do ...@@ -11,7 +11,7 @@ RSpec.describe Geo::WikiSyncService do
describe '#execute' do describe '#execute' do
let(:project) { create(:project_empty_repo) } let(:project) { create(:project_empty_repo) }
let(:repository) { project.wiki.repository } let(:repository) { project.wiki.repository }
let(:url_to_repo) { "#{primary.clone_url_prefix}#{project.path_with_namespace}.wiki.git" } let(:url_to_repo) { "#{primary.clone_url_prefix}#{project.full_path}.wiki.git" }
before do before do
allow(Gitlab::ExclusiveLease).to receive(:new) allow(Gitlab::ExclusiveLease).to receive(:new)
......
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