mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
DEV: Use same Socket.getaddrinfo
arguments as selenium-webdriver (#27301)
Follow up to c408b53689
. We need better
debugging information
This commit is contained in:
parent
23c38cbf11
commit
d68983e060
@ -523,13 +523,22 @@ RSpec.configure do |config|
|
||||
example.run
|
||||
|
||||
if example.exception.is_a?(Socket::ResolutionError)
|
||||
info = Socket.getaddrinfo("localhost", nil)
|
||||
info = Socket.getaddrinfo("localhost", 80, Socket::AF_INET, Socket::SOCK_STREAM)
|
||||
etc_hosts = `cat /etc/hosts`
|
||||
resolve_conf = `cat /etc/resolv.conf`
|
||||
nsswitch = `cat /etc/nsswitch.conf`
|
||||
|
||||
puts <<~MSG
|
||||
Failed to resolve localhost, available addresses: #{info}
|
||||
|
||||
/etc/hosts:
|
||||
#{etc_hosts}
|
||||
|
||||
/etc/resolv.conf:
|
||||
#{resolve_conf}
|
||||
|
||||
/etc/nsswitch.conf:
|
||||
#{nsswitch}
|
||||
MSG
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user