Created
October 1, 2015 00:29
-
-
Save jcockhren/202909b3bcbc05cd8843 to your computer and use it in GitHub Desktop.
Base example of provisioner testing for saltstack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative "../../../base" | |
require Vagrant.source_root.join("plugins/provisioners/salt/config") | |
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 | |
env = isolated_environment | |
env.vagrantfile("") | |
env.create_vagrant_env | |
end | |
let(:machine) {iso_env.machine(iso_env.machine_names[0], :dummy)} | |
let(:config) { VagrantPlugins::Salt::Config.new } | |
before do | |
machine.env.stub(active_machine: [[iso_env.machine_names[0], :dummy]]) | |
config.stub(minion_config: 'salt/minion') | |
config.stub(run_highstate: true) | |
end | |
describe "#provision" do | |
it "should accept installable version from git" do | |
config.finalize! | |
vsp = VagrantPlugins::Salt::Provisioner.new(machine, config) | |
expect { vsp.provision }.not_to raise_error | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment