Merge pull request #11936 from hpaskalev/feature/improved_vbox_installation_check
Detection of availability of VirtualBox provider #11929
This commit is contained in:
commit
311429d1d3
@ -23,7 +23,8 @@ module VagrantPlugins
|
||||
rescue Vagrant::Errors::VirtualBoxInvalidVersion,
|
||||
Vagrant::Errors::VirtualBoxNotDetected,
|
||||
Vagrant::Errors::VirtualBoxKernelModuleNotLoaded,
|
||||
Vagrant::Errors::VirtualBoxInstallIncomplete
|
||||
Vagrant::Errors::VirtualBoxInstallIncomplete,
|
||||
Vagrant::Errors::VBoxManageNotFoundError
|
||||
raise if raise_error
|
||||
return false
|
||||
end
|
||||
|
||||
@ -63,6 +63,14 @@ describe VagrantPlugins::ProviderVirtualBox::Provider do
|
||||
expect { subject.usable?(true) }.
|
||||
to raise_error(Vagrant::Errors::VirtualBoxInstallIncomplete)
|
||||
end
|
||||
|
||||
it "raises an exception if VBoxManage is not found" do
|
||||
allow(VagrantPlugins::ProviderVirtualBox::Driver::Meta).to receive(:new).
|
||||
and_raise(Vagrant::Errors::VBoxManageNotFoundError)
|
||||
|
||||
expect { subject.usable?(true) }.
|
||||
to raise_error(Vagrant::Errors::VBoxManageNotFoundError)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#driver" do
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user