Test interfaces include localhost
When interfaces do not include localhost, some other tests may fail.
This commit is contained in:
parent
2c8d186c6e
commit
2f6a8baac6
@ -121,6 +121,15 @@ class TestSocket < Test::Unit::TestCase
|
||||
}
|
||||
end
|
||||
|
||||
def test_ip_address_list_include_localhost
|
||||
begin
|
||||
list = Socket.ip_address_list
|
||||
rescue NotImplementedError
|
||||
return
|
||||
end
|
||||
assert_includes list.map(&:ip_address), Addrinfo.tcp("localhost", 0).ip_address
|
||||
end
|
||||
|
||||
def test_tcp
|
||||
TCPServer.open(0) {|serv|
|
||||
addr = serv.connect_address
|
||||
|
Loading…
x
Reference in New Issue
Block a user