Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-03 04:19:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-03 04:19:28 +0300
commit30f229be4c0c3b8458244da44c37cc0485a875b2 (patch)
tree44c47024b98f9bd959ef221d30fe1000cc67e154 /spec/lib/gitlab/http_connection_adapter_spec.rb
parent33bbd0b39bda02f24468184e5e3d8f6d257246d4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/http_connection_adapter_spec.rb')
-rw-r--r--spec/lib/gitlab/http_connection_adapter_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/http_connection_adapter_spec.rb b/spec/lib/gitlab/http_connection_adapter_spec.rb
index 7c57d162e9b..43aa6aad21a 100644
--- a/spec/lib/gitlab/http_connection_adapter_spec.rb
+++ b/spec/lib/gitlab/http_connection_adapter_spec.rb
@@ -15,6 +15,18 @@ RSpec.describe Gitlab::HTTPConnectionAdapter do
stub_all_dns('https://example.org', ip_address: '93.184.216.34')
end
+ context 'with use_read_total_timeout option' do
+ let(:options) { { use_read_total_timeout: true } }
+
+ it 'sets up the connection using the Gitlab::NetHttpAdapter' do
+ expect(connection).to be_a(Gitlab::NetHttpAdapter)
+ expect(connection.address).to eq('93.184.216.34')
+ expect(connection.hostname_override).to eq('example.org')
+ expect(connection.addr_port).to eq('example.org')
+ expect(connection.port).to eq(443)
+ end
+ end
+
context 'when local requests are allowed' do
let(:options) { { allow_local_requests: true } }