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