Ensure true or false for automount option
This commit is contained in:
parent
6d0dfb2690
commit
7c06950e43
|
@ -125,9 +125,8 @@ module VagrantPlugins
|
|||
hostpath: hostpath.to_s,
|
||||
transient: transient,
|
||||
SharedFoldersEnableSymlinksCreate: enable_symlink_create,
|
||||
automount: data[:automount]
|
||||
}.delete_if { |_,v| v.nil?}
|
||||
|
||||
automount: !!data[:automount]
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ describe VagrantPlugins::ProviderVirtualBox::SyncedFolder do
|
|||
{:SharedFoldersEnableSymlinksCreate=>true,
|
||||
:guestpath=>"/folder",
|
||||
:hostpath=>"/Users/brian/vagrant-folder",
|
||||
:automount=>false,
|
||||
:disabled=>false,
|
||||
:__vagrantfile=>true}} }
|
||||
|
||||
|
@ -50,6 +51,7 @@ describe VagrantPlugins::ProviderVirtualBox::SyncedFolder do
|
|||
{:SharedFoldersEnableSymlinksCreate=>false,
|
||||
:guestpath=>"/folder",
|
||||
:hostpath=>"/Users/brian/vagrant-folder",
|
||||
:automount=>false,
|
||||
:disabled=>false,
|
||||
:__vagrantfile=>true}} }
|
||||
|
||||
|
@ -65,6 +67,7 @@ describe VagrantPlugins::ProviderVirtualBox::SyncedFolder do
|
|||
let(:folders_nosymvar) { {"/folder"=>
|
||||
{:guestpath=>"/folder",
|
||||
:hostpath=>"/Users/brian/vagrant-folder",
|
||||
:automount=>false,
|
||||
:disabled=>false,
|
||||
:__vagrantfile=>true}} }
|
||||
|
||||
|
@ -75,26 +78,26 @@ describe VagrantPlugins::ProviderVirtualBox::SyncedFolder do
|
|||
end
|
||||
|
||||
it "should prepare and share the folders" do
|
||||
expect(driver).to receive(:share_folders).with([{:name=>"folder", :hostpath=>"/Users/brian/vagrant-folder", :transient=>false, :SharedFoldersEnableSymlinksCreate=>true}])
|
||||
expect(driver).to receive(:share_folders).with([{:name=>"folder", :hostpath=>"/Users/brian/vagrant-folder", :transient=>false, :automount=>false, :SharedFoldersEnableSymlinksCreate=>true}])
|
||||
subject.prepare(machine, folders, nil)
|
||||
end
|
||||
|
||||
it "should prepare and share the folders without symlinks enabled" do
|
||||
expect(driver).to receive(:share_folders).with([{:name=>"folder", :hostpath=>"/Users/brian/vagrant-folder", :transient=>false, :SharedFoldersEnableSymlinksCreate=>false}])
|
||||
expect(driver).to receive(:share_folders).with([{:name=>"folder", :hostpath=>"/Users/brian/vagrant-folder", :transient=>false, :automount=>false, :SharedFoldersEnableSymlinksCreate=>false}])
|
||||
subject.prepare(machine, folders_disabled, nil)
|
||||
end
|
||||
|
||||
it "should prepare and share the folders without symlinks enabled with env var set" do
|
||||
stub_env('VAGRANT_DISABLE_VBOXSYMLINKCREATE'=>'1')
|
||||
|
||||
expect(driver).to receive(:share_folders).with([{:name=>"folder", :hostpath=>"/Users/brian/vagrant-folder", :transient=>false, :SharedFoldersEnableSymlinksCreate=>false}])
|
||||
expect(driver).to receive(:share_folders).with([{:name=>"folder", :hostpath=>"/Users/brian/vagrant-folder", :transient=>false, :automount=>false, :SharedFoldersEnableSymlinksCreate=>false}])
|
||||
subject.prepare(machine, folders_nosymvar, nil)
|
||||
end
|
||||
|
||||
it "should prepare and share the folders and override symlink setting" do
|
||||
stub_env('VAGRANT_DISABLE_VBOXSYMLINKCREATE'=>'1')
|
||||
|
||||
expect(driver).to receive(:share_folders).with([{:name=>"folder", :hostpath=>"/Users/brian/vagrant-folder", :transient=>false, :SharedFoldersEnableSymlinksCreate=>true}])
|
||||
expect(driver).to receive(:share_folders).with([{:name=>"folder", :hostpath=>"/Users/brian/vagrant-folder", :transient=>false, :automount=>false, :SharedFoldersEnableSymlinksCreate=>true}])
|
||||
subject.prepare(machine, folders, nil)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue