Sha256: fb9af5ba33fafd9da3988451f75f649145e3aeebb428df491bd39bf0181d9665

Contents?: true

Size: 1.13 KB

Versions: 28

Compression:

Stored size: 1.13 KB

Contents

#! /usr/bin/env ruby
require 'spec_helper'

describe Puppet::Transaction::Report do
  describe "when using the indirector" do
    after do
      Puppet.settings.stubs(:use)
    end

    it "should be able to delegate to the :processor terminus" do
      Puppet::Transaction::Report.indirection.stubs(:terminus_class).returns :processor

      terminus = Puppet::Transaction::Report.indirection.terminus(:processor)

      Facter.stubs(:value).returns "host.domain.com"

      report = Puppet::Transaction::Report.new("apply")

      terminus.expects(:process).with(report)

      Puppet::Transaction::Report.indirection.save(report)
    end
  end

  describe "when dumping to YAML" do
    it "should not contain TagSet objects" do
      resource = Puppet::Resource.new(:notify, "Hello")
      ral_resource = resource.to_ral
      status = Puppet::Resource::Status.new(ral_resource)

      log = Puppet::Util::Log.new(:level => :info, :message => "foo")

      report = Puppet::Transaction::Report.new("apply")
      report.add_resource_status(status)
      report << log

      expect(YAML.dump(report)).to_not match('Puppet::Util::TagSet')
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
puppet-4.5.3 spec/integration/transaction/report_spec.rb
puppet-4.5.3-x86-mingw32 spec/integration/transaction/report_spec.rb
puppet-4.5.3-x64-mingw32 spec/integration/transaction/report_spec.rb
puppet-4.5.3-universal-darwin spec/integration/transaction/report_spec.rb
puppet-4.5.2 spec/integration/transaction/report_spec.rb
puppet-4.5.2-x86-mingw32 spec/integration/transaction/report_spec.rb
puppet-4.5.2-x64-mingw32 spec/integration/transaction/report_spec.rb
puppet-4.5.2-universal-darwin spec/integration/transaction/report_spec.rb
puppet-4.5.1 spec/integration/transaction/report_spec.rb
puppet-4.5.1-x86-mingw32 spec/integration/transaction/report_spec.rb
puppet-4.5.1-x64-mingw32 spec/integration/transaction/report_spec.rb
puppet-4.5.1-universal-darwin spec/integration/transaction/report_spec.rb
puppet-4.5.0 spec/integration/transaction/report_spec.rb
puppet-4.5.0-x86-mingw32 spec/integration/transaction/report_spec.rb
puppet-4.5.0-x64-mingw32 spec/integration/transaction/report_spec.rb
puppet-4.5.0-universal-darwin spec/integration/transaction/report_spec.rb
puppet-4.4.2 spec/integration/transaction/report_spec.rb
puppet-4.4.2-x86-mingw32 spec/integration/transaction/report_spec.rb
puppet-4.4.2-x64-mingw32 spec/integration/transaction/report_spec.rb
puppet-4.4.2-universal-darwin spec/integration/transaction/report_spec.rb