linting previous test

This commit is contained in:
HoneyryderChuck 2023-01-23 12:13:31 +00:00
parent a6cfaf4ec3
commit 0a35b125f4

View File

@ -9,8 +9,8 @@ class Bug_0_22_2_Test < Minitest::Test
Plugin = Module.new do
@connections = []
def self.connections
@connections
class << self
attr_reader :connections
end
self::ConnectionMethods = Module.new do
@ -22,11 +22,12 @@ class Bug_0_22_2_Test < Minitest::Test
end
def test_happy_eyeballs_v2_use_correct_family
connections = []
ipv4_host = "badipv6.test.ipv6friday.org"
ipv6_host = "badipv4.test.ipv6friday.org"
HTTPX.plugin(Plugin).wrap do |http|
response_ipv4 = http.get("http://#{ipv4_host}")
response_ipv6 = http.get("http://#{ipv6_host}")
_response_ipv4 = http.get("http://#{ipv4_host}")
_response_ipv6 = http.get("http://#{ipv6_host}")
end
assert Plugin.connections.size == 2
connection_ipv4 = Plugin.connections.find { |conn| conn.origin.to_s == "http://#{ipv4_host}" }
@ -35,14 +36,4 @@ class Bug_0_22_2_Test < Minitest::Test
assert connection_ipv4.family == Socket::AF_INET
assert connection_ipv6.family == Socket::AF_INET6
end
private
def ipv4_host
"badipv6.test.ipv6friday.org"
end
def ipv6_host
"badipv4.test.ipv6friday.org"
end
end
end