Use 127.0.0.1 instead of localhost

in test is_port_open_test.rb
This commit is contained in:
Pavel Valena 2018-01-31 19:08:35 +01:00 committed by GitHub
parent ff3b025fc2
commit a102bc064f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ describe Vagrant::Util::IsPortOpen do
end end
# Verify that we report the port is open # Verify that we report the port is open
expect(klass.is_port_open?("localhost", open_port)).to be expect(klass.is_port_open?("127.0.0.1", open_port)).to be
# Kill the thread # Kill the thread
thr[:die] = true thr[:die] = true
@ -47,7 +47,7 @@ describe Vagrant::Util::IsPortOpen do
# This CAN fail, since port 52811 might actually be in use, but I'm # This CAN fail, since port 52811 might actually be in use, but I'm
# not sure what to do except choose some random port and hope for the # not sure what to do except choose some random port and hope for the
# best, really. # best, really.
expect(klass.is_port_open?("localhost", closed_port)).not_to be expect(klass.is_port_open?("127.0.0.1", closed_port)).not_to be
end end
end end