diff options
Diffstat (limited to 'spec/lib/gitlab/gitaly_client/repository_service_spec.rb')
-rw-r--r-- | spec/lib/gitlab/gitaly_client/repository_service_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client/repository_service_spec.rb b/spec/lib/gitlab/gitaly_client/repository_service_spec.rb index 73322b25aae..58ace05b0d3 100644 --- a/spec/lib/gitlab/gitaly_client/repository_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/repository_service_spec.rb @@ -343,4 +343,18 @@ RSpec.describe Gitlab::GitalyClient::RepositoryService do expect(client.full_path).to eq(path) end end + + describe "#find_license" do + it 'sends a find_license request with medium timeout' do + expect_any_instance_of(Gitaly::RepositoryService::Stub) + .to receive(:find_license) do |_service, _request, headers| + expect(headers[:deadline]).to be_between( + Gitlab::GitalyClient.fast_timeout.seconds.from_now.to_f, + Gitlab::GitalyClient.medium_timeout.seconds.from_now.to_f + ) + end + + client.find_license + end + end end |