diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-07-19 21:23:27 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-07-19 21:23:27 +0300 |
commit | eb3f465e75ee1fc5ef582e9f01f921626d7cf5cc (patch) | |
tree | 878c43ecb6dc5fbf11baf252e0e7b00bc34f6f65 /spec | |
parent | fbfba6f1b433512b91c6244746ff064f2d790e3f (diff) | |
parent | ec5ceae623fceff0a959c7d297970d37285532dc (diff) |
Merge branch 'sh-fix-gitaly-server-info-cache' into 'master'
Fix Gitaly auto-detection caching
Closes #64802
See merge request gitlab-org/gitlab-ce!30954
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/gitaly_client_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client_spec.rb b/spec/lib/gitlab/gitaly_client_spec.rb index b8debee3b58..e1d24ae8977 100644 --- a/spec/lib/gitlab/gitaly_client_spec.rb +++ b/spec/lib/gitlab/gitaly_client_spec.rb @@ -119,6 +119,19 @@ describe Gitlab::GitalyClient do end end + describe '.can_use_disk?' do + it 'properly caches a false result' do + # spec_helper stubs this globally + allow(described_class).to receive(:can_use_disk?).and_call_original + expect(described_class).to receive(:filesystem_id).once + expect(described_class).to receive(:filesystem_id_from_disk).once + + 2.times do + described_class.can_use_disk?('unknown') + end + end + end + describe '.connection_data' do it 'returns connection data' do address = 'tcp://localhost:9876' |