Fix broken test; Add explicit test
Hopefully the explicit test will prevent this from being regressed again in the future
This commit is contained in:
parent
3bff55034a
commit
4afe0478b8
|
@ -173,7 +173,7 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
|
||||||
subject.communicator = "winrm"
|
subject.communicator = "winrm"
|
||||||
subject.finalize!
|
subject.finalize!
|
||||||
n = subject.networks
|
n = subject.networks
|
||||||
expect(n.length).to eq(2)
|
expect(n.length).to eq(3)
|
||||||
|
|
||||||
expect(n[0][0]).to eq(:forwarded_port)
|
expect(n[0][0]).to eq(:forwarded_port)
|
||||||
expect(n[0][1][:guest]).to eq(5985)
|
expect(n[0][1][:guest]).to eq(5985)
|
||||||
|
@ -188,6 +188,32 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
|
||||||
expect(n[1][1][:id]).to eq("winrm-ssl")
|
expect(n[1][1][:id]).to eq("winrm-ssl")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "forwards ssh even if the communicator is winrm" do
|
||||||
|
subject.communicator = "winrm"
|
||||||
|
subject.finalize!
|
||||||
|
n = subject.networks
|
||||||
|
expect(n.length).to eq(3)
|
||||||
|
|
||||||
|
expect(n[0][0]).to eq(:forwarded_port)
|
||||||
|
expect(n[0][1][:guest]).to eq(5985)
|
||||||
|
expect(n[0][1][:host]).to eq(55985)
|
||||||
|
expect(n[0][1][:host_ip]).to eq("127.0.0.1")
|
||||||
|
expect(n[0][1][: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")
|
||||||
|
|
||||||
|
expect(n[2][0]).to eq(:forwarded_port)
|
||||||
|
expect(n[2][1][:guest]).to eq(22)
|
||||||
|
expect(n[2][1][:host]).to eq(2222)
|
||||||
|
expect(n[2][1][:host_ip]).to eq("127.0.0.1")
|
||||||
|
expect(n[2][1][:id]).to eq("ssh")
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
it "allows overriding SSH" do
|
it "allows overriding SSH" do
|
||||||
subject.network "forwarded_port",
|
subject.network "forwarded_port",
|
||||||
guest: 22, host: 14100, id: "ssh"
|
guest: 22, host: 14100, id: "ssh"
|
||||||
|
|
Loading…
Reference in New Issue