Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Msg reduction filtering. Close: #102 #108

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

gothicx
Copy link
Contributor

@gothicx gothicx commented Apr 28, 2016

No description provided.

@@ -570,6 +570,16 @@
end
it { should contain_file('rsyslog_config').with_content(/^\$DirCreateMode 0770$/) }
end

context 'with msg_reduction=true' do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good test, though we also need if msg_reduction is false. Since we allow stringified booleans, 'true' and 'false', we should check those as well. Try this approach.

describe 'with msg_reduction' do
  [true,'true'].each do |value|
    context "set to #{value.class} #{value}" do
      let (:params) { { :msg_reduction => value } }
      ... put tests here ...
    end
  [false,'false'].each do |value|
    context "set to #{value.class} #{value}" do
      let (:params) { { :msg_reduction => value } }
      ... put tests here ...
    end
  end
end

@ghoneycutt
Copy link
Owner

Add your new param after mod_imjournal at the line so that it is checked in the parameter type validation.

https://github.com/ghoneycutt/puppet-module-rsyslog/blob/master/spec/classes/init_spec.rb#L1523

@ghoneycutt
Copy link
Owner

Not sure why the tests are failing here..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants