Merge pull request #7986 from chrisroberts/salt-provisioner/fix-constant

Fix Hash constant construction in Salt provisioner
This commit is contained in:
Chris Roberts 2016-11-09 16:34:34 -08:00 committed by GitHub
commit 2cbbf1af09
2 changed files with 36 additions and 1 deletions

View File

@ -6,7 +6,7 @@ module VagrantPlugins
# Default path values to set within configuration only
# if configuration value is unset and local path exists
OPTIMISTIC_PATH_DEFAULTS = Hash[[
OPTIMISTIC_PATH_DEFAULTS = Hash[*[
"minion_config", "salt/minion",
"minion_key", "salt/key/minion.key",
"minion_pub", "salt/key/minion.pub",

View File

@ -0,0 +1,35 @@
require_relative "../../../base"
require Vagrant.source_root.join("plugins/provisioners/salt/provisioner")
describe VagrantPlugins::Salt::Provisioner do
include_context "unit"
subject { described_class.new(machine, config) }
let(:iso_env) do
# We have to create a Vagrantfile so there is a root path
env = isolated_environment
env.vagrantfile("")
env.create_vagrant_env
end
let(:machine) { iso_env.machine(iso_env.machine_names[0], :dummy) }
let(:config) { double("config") }
let(:communicator) { double("comm") }
let(:guest) { double("guest") }
before do
machine.stub(communicate: communicator)
machine.stub(guest: guest)
communicator.stub(execute: true)
communicator.stub(upload: true)
guest.stub(capability?: false)
end
describe "#provision" do
end
end