Merge branch 'zj-upgrade-gitaly-version' into 'master'
Upgrade Gitaly to 1.9.0 See merge request gitlab-org/gitlab-ce!23865
This commit is contained in:
commit
aa7c927e1e
3 changed files with 8 additions and 25 deletions
|
@ -1 +1 @@
|
||||||
1.7.0
|
1.9.0
|
||||||
|
|
|
@ -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
|
||||||
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
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue