Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rspec puppet debugging
RSpec.configure do |conf|
conf.module_path = File.join(fixture_path, 'modules')
conf.manifest_dir = File.join(fixture_path, 'manifests')
conf.hiera_config = File.join(fixture_path, 'hiera.yaml')
end
# Not sure this works for all types of https://github.com/rodjek/rspec-puppet tests. I think it works with host tests
if ENV['PUPPET_DEBUG']
Puppet::Util::Log.level = :debug
Puppet::Util::Log.newdestination(:console)
end
@hashar

This comment has been minimized.

Copy link

hashar commented Jan 2, 2018

Seems with recent rspec-puppet the Puppet::Util::Log have to be in a before(:each):

RSpec.configure do |conf|
  conf.before(:each) do
    Puppet::Util::Log.level = :debug
    Puppet::Util::Log.newdestination(:console)
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.