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
end
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
def geo_primary_http_url_to_repo(project)
......
......@@ -49,7 +49,7 @@ module Geo
message: message,
error: error,
project_id: project.id,
project_path: project.path_with_namespace)
project_path: project.full_path)
end
end
end
......@@ -27,7 +27,7 @@ module Geo
end
def new_wiki_path_with_namespace
project.wiki.path_with_namespace
project.wiki.full_path
end
end
end
......@@ -33,7 +33,7 @@ module Geo
end
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
......@@ -26,7 +26,7 @@ module Geo
end
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
......@@ -18,7 +18,7 @@ module Gitlab
{
class: self.class.name,
project_id: project.id,
project_path: project.path_with_namespace,
project_path: project.full_path,
message: message
}
end
......
......@@ -72,7 +72,7 @@ describe Project, elastic: true do
)
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)
end
......
......@@ -2,9 +2,9 @@ require 'spec_helper'
describe Geo::MoveRepositoryService do
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) }
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
it 'renames the path' do
......
......@@ -11,7 +11,7 @@ RSpec.describe Geo::RepositorySyncService do
describe '#execute' do
let(:project) { create(:project_empty_repo) }
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
allow(Gitlab::ExclusiveLease).to receive(:new)
......@@ -94,7 +94,7 @@ RSpec.describe Geo::RepositorySyncService do
context 'when repository sync fail' do
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
allow(repository).to receive(:fetch_geo_mirror).with(url_to_repo) { raise Gitlab::Shell::Error }
......
......@@ -11,7 +11,7 @@ RSpec.describe Geo::WikiSyncService do
describe '#execute' do
let(:project) { create(:project_empty_repo) }
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
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