Merge pull request #8911 from chrisroberts/fix/compose-hostvm
Error when compose and force_host_vm are enabled together
This commit is contained in:
commit
868856b71a
|
@ -281,6 +281,10 @@ module VagrantPlugins
|
|||
errors << I18n.t("docker_provider.errors.config.compose_configuration_hash")
|
||||
end
|
||||
|
||||
if @compose && @force_host_vm
|
||||
errors << I18n.t("docker_provider.errors.config.compose_force_vm")
|
||||
end
|
||||
|
||||
if !@create_args.is_a?(Array)
|
||||
errors << I18n.t("docker_provider.errors.config.create_args_array")
|
||||
end
|
||||
|
|
|
@ -145,6 +145,8 @@ en:
|
|||
One of "build_dir" or "image" must be set
|
||||
compose_configuration_hash: |-
|
||||
"compose_configuration" must be a hash
|
||||
compose_force_vm: |-
|
||||
Docker compose is not currently supported from within proxy VM.
|
||||
create_args_array: |-
|
||||
"create_args" must be an array
|
||||
invalid_link: |-
|
||||
|
|
|
@ -89,6 +89,25 @@ describe VagrantPlugins::DockerProvider::Config do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#compose" do
|
||||
before do
|
||||
valid_defaults
|
||||
end
|
||||
|
||||
it "should be valid when enabled" do
|
||||
subject.compose = true
|
||||
subject.finalize!
|
||||
assert_valid
|
||||
end
|
||||
|
||||
it "should be invalid when force_host_vm is enabled" do
|
||||
subject.compose = true
|
||||
subject.force_host_vm = true
|
||||
subject.finalize!
|
||||
assert_invalid
|
||||
end
|
||||
end
|
||||
|
||||
describe "#create_args" do
|
||||
before do
|
||||
valid_defaults
|
||||
|
|
Loading…
Reference in New Issue