From c5f975838d636f4fb7f89f2f464bf8912b80033e Mon Sep 17 00:00:00 2001 From: David O'Rourke Date: Tue, 10 May 2016 11:40:16 +0100 Subject: [PATCH] prepare_nfs_settings: Add spec test for static/dynamic IP combo --- .../virtualbox/action/prepare_nfs_settings_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/unit/plugins/providers/virtualbox/action/prepare_nfs_settings_test.rb b/test/unit/plugins/providers/virtualbox/action/prepare_nfs_settings_test.rb index 3cead74f4..c358f6720 100644 --- a/test/unit/plugins/providers/virtualbox/action/prepare_nfs_settings_test.rb +++ b/test/unit/plugins/providers/virtualbox/action/prepare_nfs_settings_test.rb @@ -116,5 +116,14 @@ describe VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSSettings do expect(env[:nfs_host_ip]).to eq("1.2.3.4") expect(env[:nfs_machine_ip]).to eq(["11.12.13.14"]) 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