How to disable Hiera debug output in rspec-puppet test -
i have following spec file
require 'spec_helper' describe 'plc', :type => 'class' let(:hiera_config) { 'spec/fixtures/hiera/hiera.yaml' } hiera = hiera.new({ :config => 'spec/fixtures/hiera/hiera.yaml' }) abc = hiera.lookup('plc::plc_line',nil,nil) let(:hiera_data) {{ :plc_line => abc }} it{ should contain_file('/test/rspec/etc/plc').with( 'ensure' => 'file', 'owner' => 'root', 'group' => 'root', 'mode' => '0644', 'require' => 'file[/test/rspec/etc]') } it{ should contain_file('/test/rspec/etc/plc').with_plc_line(abc)} end below /hiera/fixtures/plc.yaml
plc : puppetlab when run rake spec, following messages printed:
debug: wed jul 08 07:11:55 -0400 2015: hiera yaml backend starting debug: wed jul 08 07:11:55 -0400 2015: looking plc::plc_line in yaml backend debug: wed jul 08 07:11:55 -0400 2015: looking data source plc how can output suppressed?
just put e.g. spec_helper.rb following:
puppet::util::log.level = :warning on client can check log_level:
puppet config print log_level --section agent you can modify in e.g. /etc/puppet/puppet.conf (depend on path configs):
[agent] log_level = info
Comments
Post a Comment