report_processor_spec.rb 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. require 'spec_helper'
  2. describe 'puppetdb::master::report_processor', :type => :class do
  3. context 'on a supported platform' do
  4. let(:facts) do
  5. {
  6. :osfamily => 'RedHat',
  7. :clientcert => 'test.domain.local',
  8. }
  9. end
  10. it { should contain_class('puppetdb::master::report_processor') }
  11. describe 'when using default values' do
  12. it { should contain_ini_subsetting('puppet.conf/reports/puppetdb').
  13. with(
  14. 'ensure' => 'absent',
  15. 'path' => '/etc/puppet/puppet.conf',
  16. 'section' => 'master',
  17. 'setting' => 'reports',
  18. 'subsetting' => 'puppetdb',
  19. 'subsetting_separator' => ','
  20. )}
  21. end
  22. describe 'when enabling reports' do
  23. let(:params) do
  24. {
  25. 'enable' => true
  26. }
  27. end
  28. it { should contain_ini_subsetting('puppet.conf/reports/puppetdb').
  29. with(
  30. 'ensure' => 'present',
  31. 'path' => '/etc/puppet/puppet.conf',
  32. 'section' => 'master',
  33. 'setting' => 'reports',
  34. 'subsetting' => 'puppetdb',
  35. 'subsetting_separator' => ','
  36. )}
  37. end
  38. end
  39. end