Merge pull request #7387 from phyber/fix/master/prepare_nfs_settings_scoped_hash_overrides_fix
Fix/master/prepare_nfs_settings scoped hash overrides fix
This commit is contained in:
commit
073e65abf0
|
@ -90,6 +90,8 @@ module VagrantPlugins
|
|||
def read_static_machine_ips
|
||||
ips = []
|
||||
@machine.config.vm.networks.each do |type, options|
|
||||
options = scoped_hash_override(options, :virtualbox)
|
||||
|
||||
if type == :private_network && options[:type] != :dhcp && options[:ip].is_a?(String)
|
||||
ips << options[:ip]
|
||||
end
|
||||
|
|
|
@ -125,5 +125,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", "2.3.4.5"])
|
||||
end
|
||||
|
||||
it "allows the use of scoped hash overrides as options" do
|
||||
env[:machine].config.vm.network :private_network, virtualbox__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
|
||||
|
|
Loading…
Reference in New Issue