require 'spec_helper_acceptance' describe "Acceptance Testing" do before :each do |test| Onceover::Beaker.match_indentation(test,logger) end <% tests.each do |test| -%> <% test.nodes.each do |node| -%> <% test.classes.each do |cls| -%> describe "<%= cls.name %> on <%= node.name %>" do after :all do $host.down! end describe "provisioning <%= node.name %>" do it "should be able to provision using Beaker" do expect { $host = Onceover::Beaker.host_create(:'<%= node.name %>',OPTIONS) }.not_to raise_exception end end describe "copying code to <%= node.name %>" do it "should copy the code successfully" do expect { scp_to $host, 'etc', '/' }.not_to raise_exception end end <% test.test_config['runs_before_idempotency'].times do %> describe "running puppet" do it "should run with no errors" do expect { manifest = < include <%= cls.name %> CODE apply_manifest_on($host,manifest,{:catch_failures => true}) }.not_to raise_exception end end <% end -%> <% if test.test_config['check_idempotency'] then %> describe "checking for idempotency" do it "should run with no changes" do expect { manifest = < include <%= cls.name %> CODE apply_manifest_on($host,manifest,{:catch_changes => true}) }.not_to raise_exception end end <% end -%> end <% end -%> <% end -%> <% end -%> end