diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-12-17 11:26:09 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-12-17 11:26:09 +0300 |
commit | 50ce459118034893b793dd9a601df5d20831b943 (patch) | |
tree | 92e7e3396cc250b6e9aac7db4bd576fe35509469 /spec/lib/gitlab | |
parent | 8b4602041cf2c4a8738a4796d78720017249249f (diff) |
Upgrade Gitaly to 1.9.0
This upgrade moves logic from gitlab-rails to Gitaly, which allowed code
removal too.
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r-- | spec/lib/gitlab/git/object_pool_spec.rb | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/spec/lib/gitlab/git/object_pool_spec.rb b/spec/lib/gitlab/git/object_pool_spec.rb index 363c2aa67af..0d5069568e1 100644 --- a/spec/lib/gitlab/git/object_pool_spec.rb +++ b/spec/lib/gitlab/git/object_pool_spec.rb @@ -56,16 +56,11 @@ describe Gitlab::Git::ObjectPool do describe '#link' do 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 - subject.link(source_repository) - - repo = Gitlab::GitalyClient::StorageSettings.allow_disk_access do - 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) + expect do + subject.link(source_repository) + end.not_to raise_error end end @@ -75,14 +70,9 @@ describe Gitlab::Git::ObjectPool do end it "doesn't raise an error" do - subject.link(source_repository) - - repo = Gitlab::GitalyClient::StorageSettings.allow_disk_access do - 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) + expect do + subject.link(source_repository) + end.not_to raise_error end end end |