Fix default forwarded ports

This commit is contained in:
Max Lincoln 2014-12-11 13:39:24 -05:00
parent e7e50d39d9
commit b5a9477405
2 changed files with 18 additions and 7 deletions

View File

@ -399,6 +399,13 @@ module VagrantPlugins
host_ip: "127.0.0.1", host_ip: "127.0.0.1",
id: "winrm", id: "winrm",
auto_correct: true auto_correct: true
network :forwarded_port,
guest: 5986,
host: 55986,
host_ip: "127.0.0.1",
id: "winrm-ssl",
auto_correct: true
end end
elsif !@__networks["forwarded_port-ssh"] elsif !@__networks["forwarded_port-ssh"]
network :forwarded_port, network :forwarded_port,

View File

@ -169,13 +169,17 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
n = subject.networks n = subject.networks
expect(n.length).to eq(2) expect(n.length).to eq(2)
# WinRM HTTP expect(n[0][0]).to eq(:forwarded_port)
network = find_network("winrm") expect(n[0][1][:guest]).to eq(5985)
# expect(n[0][0]).to eq(:forwarded_port) expect(n[0][1][:host]).to eq(55985)
expect(network[:guest]).to eq(5985) expect(n[0][1][:host_ip]).to eq("127.0.0.1")
expect(network[:host]).to eq(55985) expect(n[0][1][:id]).to eq("winrm")
expect(network[:host_ip]).to eq("127.0.0.1")
expect(network[:id]).to eq("winrm") expect(n[1][0]).to eq(:forwarded_port)
expect(n[1][1][:guest]).to eq(5986)
expect(n[1][1][:host]).to eq(55986)
expect(n[1][1][:host_ip]).to eq("127.0.0.1")
expect(n[1][1][:id]).to eq("winrm-ssl")
end end
it "allows overriding SSH" do it "allows overriding SSH" do