-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Use data types, remove anchors #773
Conversation
juniorsysadmin
commented
Apr 1, 2018
- Only allow Boolean for $purge
- Only allow Boolean for $recurse
- Only allow Integer for $write_queue_limit_low
- Only allow Integer for $write_queue_limit_high
- Don't allow undef for $manage_service
- Replace anchors with contain
- Remove some unecessary tests
- Only allow Boolean for $purge - Only allow Boolean for $recurse - Only allow Integer for $write_queue_limit_low - Only allow Integer for $write_queue_limit_high - Don't allow undef for $manage_service - Replace anchors with contain - Remove some unecessary tests
| String $package_ensure = $collectd::params::package_ensure, | ||
| Optional[Array] $package_install_options = $collectd::params::package_install_options, | ||
| Stdlib::Fqdn $package_keyserver = $collectd::params::package_keyserver, | ||
| Variant[String[1],Array[String[1]]] $package_name = $collectd::params::package_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#269 Appears to still affect recent Debian families
| @@ -9,20 +9,13 @@ | |||
|
|
|||
| options = os_specific_options(facts) | |||
| context 'with all defaults' do | |||
| it { is_expected.to contain_class('collectd') } | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you remove those two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When inside init.pp we know that a class called collectd will always be there. I just didn't see any value to the test.
Same with params.
| it { is_expected.to contain_file('collectd.conf').without_content } | ||
| it { is_expected.to contain_file('collectd.d').with_ensure('directory') } | ||
| it { is_expected.to contain_file_line('include_conf_d').with_ensure('absent') } | ||
| it { is_expected.to contain_file_line('include_conf_d_dot_conf').with_ensure('present') } | ||
| it { is_expected.to contain_package(options[:package]).with_ensure('present') } | ||
| it { is_expected.to contain_package(options[:package]).with_install_options(nil) } | ||
| it { is_expected.to contain_class('collectd::install').that_comes_before('Class[collectd::config]') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those checks should still be valid, since we use ->?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid, but again I don't think it is useful, as we don't have any conditional logic which will result in the order of classes changing.