Error when compose and force_host_vm are enabled together
This commit is contained in:
parent
c3f0b1c1b2
commit
f660c19084
|
@ -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