providers/docker: can set default provider to docker [GH-3662]
This commit is contained in:
parent
8bb9d18260
commit
ca428388d8
|
@ -13,6 +13,8 @@ BUG FIXES:
|
|||
- guests/redhat: Fix networking issues with CentOS. [GH-3649]
|
||||
- guests/windows: Human error if WinRM not in use to configure networks. [GH-3651]
|
||||
- providers/docker: Show proper error message when on Linux. [GH-3654]
|
||||
- providers/docker: Proxy VM works properly even if default provider
|
||||
environmental variable set to "docker" [GH-3662]
|
||||
- synced\_folders/rsync: Create the directory before syncing.
|
||||
|
||||
## 1.6.0 (May 6, 2014)
|
||||
|
|
|
@ -87,7 +87,10 @@ module VagrantPlugins
|
|||
|
||||
host_env.machine(
|
||||
host_machine_name,
|
||||
host_env.default_provider(exclude: [:docker]))
|
||||
host_env.default_provider(
|
||||
exclude: [:docker],
|
||||
force_default: false,
|
||||
))
|
||||
end
|
||||
|
||||
@host_vm
|
||||
|
|
|
@ -766,6 +766,27 @@ VF
|
|||
end
|
||||
end
|
||||
|
||||
it "prefers the default even if not forced" do
|
||||
plugin_providers[:baz] = [provider_usable_class(true), { priority: 5 }]
|
||||
plugin_providers[:foo] = [provider_usable_class(true), { priority: 5 }]
|
||||
plugin_providers[:bar] = [provider_usable_class(true), { priority: 7 }]
|
||||
|
||||
with_temp_env("VAGRANT_DEFAULT_PROVIDER" => "baz") do
|
||||
expect(subject.default_provider(force_default: false)).to eq(:baz)
|
||||
end
|
||||
end
|
||||
|
||||
it "uses the first usable provider that isn't the default if excluded" do
|
||||
plugin_providers[:foo] = [provider_usable_class(true), { priority: 5 }]
|
||||
plugin_providers[:bar] = [provider_usable_class(true), { priority: 7 }]
|
||||
plugin_providers[:baz] = [provider_usable_class(true), { priority: 8 }]
|
||||
|
||||
with_temp_env("VAGRANT_DEFAULT_PROVIDER" => "baz") do
|
||||
expect(subject.default_provider(
|
||||
exclude: [:baz], force_default: false)).to eq(:bar)
|
||||
end
|
||||
end
|
||||
|
||||
it "is VirtualBox if nothing else is usable" do
|
||||
plugin_providers[:foo] = [provider_usable_class(false), { priority: 5 }]
|
||||
plugin_providers[:bar] = [provider_usable_class(false), { priority: 5 }]
|
||||
|
|
Loading…
Reference in New Issue