Get tests to pass
This commit is contained in:
parent
93e365bb33
commit
5e490e3746
|
@ -0,0 +1,12 @@
|
||||||
|
require "vagrant"
|
||||||
|
|
||||||
|
module VagrantPlugins
|
||||||
|
module HostNull
|
||||||
|
class Host < Vagrant.plugin("2", :host)
|
||||||
|
def detect?
|
||||||
|
# This host can only be explicitly chosen.
|
||||||
|
false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,15 @@
|
||||||
|
require "vagrant"
|
||||||
|
|
||||||
|
module VagrantPlugins
|
||||||
|
module HostNull
|
||||||
|
class Plugin < Vagrant.plugin("2")
|
||||||
|
name "null host"
|
||||||
|
description "A host that implements no capabilities."
|
||||||
|
|
||||||
|
host("null") do
|
||||||
|
require_relative "host"
|
||||||
|
Host
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -29,3 +29,11 @@ end
|
||||||
# Configure VAGRANT_CWD so that the tests never find an actual
|
# Configure VAGRANT_CWD so that the tests never find an actual
|
||||||
# Vagrantfile anywhere, or at least this minimizes those chances.
|
# Vagrantfile anywhere, or at least this minimizes those chances.
|
||||||
ENV["VAGRANT_CWD"] = Tempdir.new.path
|
ENV["VAGRANT_CWD"] = Tempdir.new.path
|
||||||
|
|
||||||
|
# Unset all host plugins so that we aren't executing subprocess things
|
||||||
|
# to detect a host for every test.
|
||||||
|
Vagrant.plugin("2").manager.registered.dup.each do |plugin|
|
||||||
|
if plugin.components.hosts.to_hash.length > 0
|
||||||
|
Vagrant.plugin("2").manager.unregister(plugin)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
require_relative "../base"
|
require_relative "../base"
|
||||||
|
|
||||||
describe VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSSettings do
|
describe VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSSettings do
|
||||||
|
include_context "unit"
|
||||||
include_context "virtualbox"
|
include_context "virtualbox"
|
||||||
|
|
||||||
let(:machine) {
|
let(:machine) {
|
||||||
|
|
Loading…
Reference in New Issue