Commit aa7c927e authored by Douwe Maan's avatar Douwe Maan

Merge branch 'zj-upgrade-gitaly-version' into 'master'

Upgrade Gitaly to 1.9.0

See merge request gitlab-org/gitlab-ce!23865
parents a8794c42 50ce4591
...@@ -23,13 +23,6 @@ module Gitlab ...@@ -23,13 +23,6 @@ module Gitlab
end end
def link(to_link_repo) def link(to_link_repo)
remote_name = to_link_repo.object_pool_remote_name
repository.set_config(
"remote.#{remote_name}.url" => relative_path_to(to_link_repo.relative_path),
"remote.#{remote_name}.tagOpt" => "--no-tags",
"remote.#{remote_name}.fetch" => "+refs/*:refs/remotes/#{remote_name}/*"
)
object_pool_service.link_repository(to_link_repo) object_pool_service.link_repository(to_link_repo)
end end
......
...@@ -56,16 +56,11 @@ describe Gitlab::Git::ObjectPool do ...@@ -56,16 +56,11 @@ describe Gitlab::Git::ObjectPool do
describe '#link' do describe '#link' do
let!(:pool_repository) { create(:pool_repository, :ready) } let!(:pool_repository) { create(:pool_repository, :ready) }
context 'when no remotes are set' do context 'when linked for the first time' do
it 'sets a remote' do it 'sets a remote' do
subject.link(source_repository) expect do
subject.link(source_repository)
repo = Gitlab::GitalyClient::StorageSettings.allow_disk_access do end.not_to raise_error
Rugged::Repository.new(subject.repository.path)
end
expect(repo.remotes.count).to be(1)
expect(repo.remotes.first.name).to eq(source_repository.object_pool_remote_name)
end end
end end
...@@ -75,14 +70,9 @@ describe Gitlab::Git::ObjectPool do ...@@ -75,14 +70,9 @@ describe Gitlab::Git::ObjectPool do
end end
it "doesn't raise an error" do it "doesn't raise an error" do
subject.link(source_repository) expect do
subject.link(source_repository)
repo = Gitlab::GitalyClient::StorageSettings.allow_disk_access do end.not_to raise_error
Rugged::Repository.new(subject.repository.path)
end
expect(repo.remotes.count).to be(1)
expect(repo.remotes.first.name).to eq(source_repository.object_pool_remote_name)
end end
end end
end end
......
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