Get folder mount name

This commit is contained in:
sophia 2021-04-06 11:00:41 -05:00
parent f7973f00ed
commit 82dde55e64
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ module VagrantPlugins
:shell_expand_guest_path, guestpath)
options[:smb_id] ||= name
mount_device = options[:plugin].capability(:mount_name, options)
mount_device = options[:plugin].capability(:mount_name, name, options)
mount_options, _, _ = options[:plugin].capability(
:mount_options, name, expanded_guest_path, options)
mount_type = options[:plugin].capability(:mount_type)

View File

@ -43,7 +43,7 @@ describe "VagrantPlugins::GuestLinux::Cap::MountSMBSharedFolder" do
allow(folder_plugin).to receive(:capability).with(:mount_options, mount_name, mount_guest_path, folder_options).
and_return(["uid=#{mount_uid},gid=#{mount_gid},sec=ntlmssp,credentials=/etc/smb_creds_id", mount_uid, mount_gid])
allow(folder_plugin).to receive(:capability).with(:mount_type).and_return("cifs")
allow(folder_plugin).to receive(:capability).with(:mount_name, any_args).and_return("//localhost/#{mount_name}")
allow(folder_plugin).to receive(:capability).with(:mount_name, mount_name, folder_options).and_return("//localhost/#{mount_name}")
end
after do

View File

@ -121,7 +121,7 @@ describe "VagrantPlugins::GuestLinux::Cap::PersistMountSharedFolder" do
before do
allow(folder_plugin).to receive(:capability).with(:mount_type).and_return("cifs")
allow(folder_plugin).to receive(:capability?).with(:mount_name).and_return(true)
allow(folder_plugin).to receive(:capability).with(:mount_name, any_args).and_return("//192.168.42.42/dummyname")
allow(folder_plugin).to receive(:capability).with(:mount_name, instance_of(String), any_args).and_return("//192.168.42.42/dummyname")
end
it "inserts folders into /etc/fstab" do