Switch to Vagrant::Util methods
This commit is contained in:
parent
e7d48b0b93
commit
73130e3ff6
@ -270,7 +270,7 @@ module Vagrant
|
||||
else
|
||||
# Do a regular check
|
||||
if test_host_ip == "0.0.0.0" || Addrinfo.ip(test_host_ip).ipv4_loopback? ||
|
||||
ipv4_interfaces.detect { |iface| iface[1] == test_host_ip }
|
||||
Vagrant::Util::IPv4Interfaces.ipv4_interfaces.detect { |iface| iface[1] == test_host_ip }
|
||||
Vagrant::Util::IsPortOpen.is_port_open?(test_host_ip, host_port)
|
||||
else
|
||||
raise Errors::ForwardPortHostIPNotFound, name: machine.name, host_ip: host_ip
|
||||
|
||||
@ -209,7 +209,7 @@ describe Vagrant::Action::Builtin::HandleForwardedPortCollisions do
|
||||
let (:host_ip) { "127.1.2.40" }
|
||||
|
||||
it "should check if the port is open" do
|
||||
expect(instance).to receive(:is_port_open?).with(host_ip, host_port).and_return(true)
|
||||
expect(Vagrant::Util::IsPortOpen).to receive(:is_port_open?).with(host_ip, host_port).and_return(true)
|
||||
instance.send(:port_check, host_ip, host_port)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user