Fix automount select to accept key/val instead of just val
This commit is contained in:
parent
c1e0504c66
commit
e0c716e454
|
@ -114,7 +114,7 @@ module Vagrant
|
||||||
@env.ui.info I18n.t("vagrant.actions.vm.nfs.mounting")
|
@env.ui.info I18n.t("vagrant.actions.vm.nfs.mounting")
|
||||||
|
|
||||||
# Only mount the folders which have a guest path specified
|
# Only mount the folders which have a guest path specified
|
||||||
am_folders = folders.select { |folder| folder[:guestpath] }
|
am_folders = folders.select { |name, folder| folder[:guestpath] }
|
||||||
@env["vm"].system.mount_nfs(host_ip, am_folders)
|
@env["vm"].system.mount_nfs(host_ip, am_folders)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ class NFSVMActionTest < Test::Unit::TestCase
|
||||||
context "mounting folders" do
|
context "mounting folders" do
|
||||||
setup do
|
setup do
|
||||||
@instance.stubs(:host_ip).returns("foo")
|
@instance.stubs(:host_ip).returns("foo")
|
||||||
@instance.stubs(:folders).returns([{:guestpath => "foo"}])
|
@instance.stubs(:folders).returns({ "v-data" => {:guestpath => "foo"}})
|
||||||
end
|
end
|
||||||
|
|
||||||
should "mount the folders on the system" do
|
should "mount the folders on the system" do
|
||||||
|
@ -169,8 +169,8 @@ class NFSVMActionTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
should "not mount folders which have no guest path" do
|
should "not mount folders which have no guest path" do
|
||||||
@instance.stubs(:folders).returns([{}])
|
@instance.stubs(:folders).returns({ "v-data" => {}})
|
||||||
@vm.system.expects(:mount_nfs).with(@instance.host_ip, [])
|
@vm.system.expects(:mount_nfs).with(@instance.host_ip, {})
|
||||||
@instance.mount_folders
|
@instance.mount_folders
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue