diff options
Diffstat (limited to 'spec/lib/gitlab/gitaly_client_spec.rb')
-rw-r--r-- | spec/lib/gitlab/gitaly_client_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client_spec.rb b/spec/lib/gitlab/gitaly_client_spec.rb index ea3bb12d049..b8df9ad642a 100644 --- a/spec/lib/gitlab/gitaly_client_spec.rb +++ b/spec/lib/gitlab/gitaly_client_spec.rb @@ -17,6 +17,28 @@ describe Gitlab::GitalyClient do }) end + describe '.long_timeout' do + context 'default case' do + it { expect(subject.long_timeout).to eq(6.hours) } + end + + context 'running in Unicorn' do + before do + stub_const('Unicorn', 1) + end + + it { expect(subject.long_timeout).to eq(55) } + end + + context 'running in Puma' do + before do + stub_const('Puma', 1) + end + + it { expect(subject.long_timeout).to eq(55) } + end + end + describe '.filesystem_id_from_disk' do it 'catches errors' do [Errno::ENOENT, Errno::EACCES, JSON::ParserError].each do |error| |