prepare_nfs_settings: Add spec test for static/dynamic IP combo

This commit is contained in:
David O'Rourke 2016-05-10 11:40:16 +01:00
parent 985f1d4dda
commit c5f975838d
1 changed files with 9 additions and 0 deletions

View File

@ -116,5 +116,14 @@ describe VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSSettings do
expect(env[:nfs_host_ip]).to eq("1.2.3.4") expect(env[:nfs_host_ip]).to eq("1.2.3.4")
expect(env[:nfs_machine_ip]).to eq(["11.12.13.14"]) expect(env[:nfs_machine_ip]).to eq(["11.12.13.14"])
end end
it "allows statically configured guest IPs to co-exist with dynamic host only IPs for NFS" do
env[:machine].config.vm.network :private_network, ip: "11.12.13.14"
subject.call(env)
expect(env[:nfs_host_ip]).to eq("1.2.3.4")
expect(env[:nfs_machine_ip]).to eq(["11.12.13.14", "2.3.4.5"])
end
end end
end end