Fix broken unit tests
This commit is contained in:
parent
57a1269e35
commit
7988f0fb7c
|
@ -112,10 +112,12 @@ module Vagrant
|
|||
raise "Internal error. Report this as a bug. Invalid: #{data[:type]}"
|
||||
end
|
||||
|
||||
if !impl_class[0].new.usable?(machine, true)
|
||||
# Verify that explicitly defined shared folder types are
|
||||
# actually usable.
|
||||
raise Errors::SyncedFolderUnusable, type: data[:type].to_s
|
||||
if !opts[:disable_usable_check]
|
||||
if !impl_class[0].new.usable?(machine, true)
|
||||
# Verify that explicitly defined shared folder types are
|
||||
# actually usable.
|
||||
raise Errors::SyncedFolderUnusable, type: data[:type].to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ module VagrantPlugins
|
|||
opts = {
|
||||
cached: !!env[:synced_folders_cached],
|
||||
config: env[:synced_folders_config],
|
||||
disable_usable_check: !!env[:test],
|
||||
}
|
||||
folders = synced_folders(env[:machine], **opts)
|
||||
|
||||
|
|
|
@ -25,6 +25,10 @@ describe VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSSettings do
|
|||
|
||||
subject { described_class.new(app, env) }
|
||||
|
||||
before do
|
||||
env[:test] = true
|
||||
end
|
||||
|
||||
it "calls the next action in the chain" do
|
||||
called = false
|
||||
app = lambda { |*args| called = true }
|
||||
|
|
Loading…
Reference in New Issue