Sha256: 4a79d21e778be4b8c2a6bf5b77707524c6b82bc38dcffc0c2efa680905d608e5

Contents?: true

Size: 1.58 KB

Versions: 72

Compression:

Stored size: 1.58 KB

Contents

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 = <<CODE
$controlrepo_accpetance = true

<%= pre_condition %>

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 = <<CODE
$controlrepo_accpetance = true

<%= pre_condition %>

include <%= cls.name %>
CODE
          apply_manifest_on($host,manifest,{:catch_changes => true})
        }.not_to raise_exception
      end
    end
<% end -%>
  end
<% end -%>
<% end -%>
<% end -%>
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
onceover-4.0.0 templates/acceptance_test_spec.rb.erb
onceover-3.22.0 templates/acceptance_test_spec.rb.erb
onceover-3.21.0 templates/acceptance_test_spec.rb.erb
onceover-3.20.0 templates/acceptance_test_spec.rb.erb
onceover-3.19.2 templates/acceptance_test_spec.rb.erb
onceover-3.19.1 templates/acceptance_test_spec.rb.erb
onceover-3.19.0 templates/acceptance_test_spec.rb.erb
onceover-3.18.1 templates/acceptance_test_spec.rb.erb
onceover-3.18.0 templates/acceptance_test_spec.rb.erb
onceover-3.17.3 templates/acceptance_test_spec.rb.erb
onceover-3.17.2 templates/acceptance_test_spec.rb.erb
onceover-3.17.1 templates/acceptance_test_spec.rb.erb
onceover-3.17.0 templates/acceptance_test_spec.rb.erb
onceover-3.16.0 templates/acceptance_test_spec.rb.erb
onceover-3.15.2 templates/acceptance_test_spec.rb.erb
onceover-3.15.1 templates/acceptance_test_spec.rb.erb
onceover-3.15.0 templates/acceptance_test_spec.rb.erb
onceover-3.14.1 templates/acceptance_test_spec.rb.erb
onceover-3.14.0 templates/acceptance_test_spec.rb.erb
onceover-3.13.4 templates/acceptance_test_spec.rb.erb