Merge pull request #10539 from jalandis/disable-required-install_type-salt-option-windows
Disabled salt provision required install_type check on Windows
This commit is contained in:
commit
7fbcb88d82
|
@ -177,8 +177,11 @@ module VagrantPlugins
|
|||
errors << I18n.t("vagrant.provisioners.salt.python_version")
|
||||
end
|
||||
|
||||
if @version && !@install_type
|
||||
errors << I18n.t("vagrant.provisioners.salt.version_type_missing")
|
||||
# install_type is not supported in a Windows environment
|
||||
if machine.config.vm.communicator != :winrm
|
||||
if @version && !@install_type
|
||||
errors << I18n.t("vagrant.provisioners.salt.version_type_missing")
|
||||
end
|
||||
end
|
||||
|
||||
return {"salt provisioner" => errors}
|
||||
|
|
|
@ -156,5 +156,25 @@ describe VagrantPlugins::Salt::Config do
|
|||
expect(result[error_key]).to_not be_empty
|
||||
end
|
||||
end
|
||||
|
||||
context "version" do
|
||||
it "is valid if is set without install_type on Windows" do
|
||||
allow(machine.config.vm).to receive(:communicator).and_return(:winrm)
|
||||
|
||||
subject.version = "2018.3.3"
|
||||
subject.finalize!
|
||||
|
||||
result = subject.validate(machine)
|
||||
expect(result[error_key]).to be_empty
|
||||
end
|
||||
|
||||
it "is invalid if is set without install_type on Linux" do
|
||||
subject.version = "2018.3.3"
|
||||
subject.finalize!
|
||||
|
||||
result = subject.validate(machine)
|
||||
expect(result[error_key]).to_not be_empty
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue