Puppet Testing Debug

From Kyle's Wiki
Jump to: navigation, search

Send puppet debug messages to the console during rspec

it "should do stuff" do
  Puppet::Util::Log.level = :debug
  Puppet::Util::Log.newdestination(:console)
  should ...
end

Dump the Catelog during an rspec test

    it { should contain_file('/tmp/puppets_known_hosts').with(
      :owner => 'root',
      :group => 'root',
      :mode  => '0444'
      )
      $stdout.puts self.catalogue.to_yaml
    }
Personal tools
Namespaces

Variants
Actions
Efforts
Toolbox
Meta