A platform for community discussion. Free, open, simple.
Build(deps): Bump net-http from 0.2.2 to 0.3.2 (#19518)
dependabot[bot]43a8ca00b9bc
diff --git a/Gemfile.lock b/Gemfile.lockindex d7277b86068..8fe13ec64f2 100644--- a/Gemfile.lock+++ b/Gemfile.lock@@ -223,7 +223,7 @@ GEMmulti_json (1.15.0)multi_xml (0.6.0)mustache (1.1.1)- net-http (0.2.2)+ net-http (0.3.2)urinet-imap (0.3.1)net-protocoldiff --git a/spec/lib/final_destination/http_spec.rb b/spec/lib/final_destination/http_spec.rbindex 08df54e17b2..fa9a7706e64 100644--- a/spec/lib/final_destination/http_spec.rb+++ b/spec/lib/final_destination/http_spec.rb@@ -5,6 +5,7 @@ describe FinalDestination::HTTP do# We need to test low-level stuff, switch off WebMock for FinalDestination::HTTPWebMock.enable!(except: [:final_destination])Socket.stubs(:tcp).never+ TCPSocket.stubs(:open).neverAddrinfo.stubs(:getaddrinfo).neverend@@ -14,7 +15,7 @@ describe FinalDestination::HTTP dodef expect_tcp_and_abort(stub_addr, &blk)success = Class.new(StandardError)- Socket.stubs(:tcp).with { |addr| stub_addr == addr }.once.raises(success)+ TCPSocket.stubs(:open).with { |addr| stub_addr == addr }.once.raises(success)beginyieldrescue success@@ -26,7 +27,7 @@ describe FinalDestination::HTTP doenddef stub_tcp_to_raise(stub_addr, exception)- Socket.stubs(:tcp).with { |addr| addr == stub_addr }.once.raises(exception)+ TCPSocket.stubs(:open).with { |addr| addr == stub_addr }.once.raises(exception)endit "works through each IP address until success" do@@ -99,9 +100,9 @@ describe FinalDestination::HTTP doit "stops iterating over DNS records once timeout reached" dostub_ip_lookup("example.com", %w[1.1.1.1 2.2.2.2 3.3.3.3 4.4.4.4])- Socket.stubs(:tcp).with { |addr| addr == "1.1.1.1" }.raises(Errno::ECONNREFUSED)- Socket.stubs(:tcp).with { |addr| addr == "2.2.2.2" }.raises(Errno::ECONNREFUSED)- Socket.stubs(:tcp).with { |*args, **kwargs| kwargs[:open_timeout] == 0 }.raises(Errno::ETIMEDOUT)+ TCPSocket.stubs(:open).with { |addr| addr == "1.1.1.1" }.raises(Errno::ECONNREFUSED)+ TCPSocket.stubs(:open).with { |addr| addr == "2.2.2.2" }.raises(Errno::ECONNREFUSED)+ TCPSocket.stubs(:open).with { |*args, **kwargs| kwargs[:open_timeout] == 0 }.raises(Errno::ETIMEDOUT)FinalDestination::HTTP.any_instance.stubs(:current_time).returns(0, 1, 5)expect doFinalDestination::HTTP.start("example.com", 80, open_timeout: 5) {}