diff --git a/manifests/plugin/genericjmx.pp b/manifests/plugin/genericjmx.pp index eb5df8c33..5db8e89db 100644 --- a/manifests/plugin/genericjmx.pp +++ b/manifests/plugin/genericjmx.pp @@ -1,6 +1,5 @@ # https://collectd.org/wiki/index.php/Plugin:GenericJMX class collectd::plugin::genericjmx ( - $ensure = present, $jvmarg = [], ) { include collectd @@ -10,7 +9,6 @@ $config_file = "${collectd::params::plugin_conf_dir}/15-genericjmx.conf" concat { $config_file: - ensure => $ensure, mode => '0640', owner => 'root', group => $collectd::params::root_group, diff --git a/spec/classes/collectd_plugin_genericjmx_spec.rb b/spec/classes/collectd_plugin_genericjmx_spec.rb index c8eb126c5..2393e3544 100644 --- a/spec/classes/collectd_plugin_genericjmx_spec.rb +++ b/spec/classes/collectd_plugin_genericjmx_spec.rb @@ -10,7 +10,7 @@ let (:config_filename) { '/etc/collectd/conf.d/15-genericjmx.conf' } - context ':ensure => present, defaults' do + context 'defaults' do it 'will include the java plugin' do should contain_class('collectd::plugin::java') end @@ -45,15 +45,6 @@ end - context ':ensure => absent' do - let (:params) {{ :ensure => 'absent' }} - it 'should not load the plugin' do - should contain_concat(config_filename).with({ - :ensure => 'absent', - }) - end - end - context 'jvmarg parameter array' do let (:params) {{ :jvmarg => %w{ foo bar baz } }} it 'should have multiple jvmarg parameters' do @@ -73,7 +64,7 @@ context 'jvmarg parameter empty' do let (:params) {{ :jvmarg => [] }} - it 'should wnot have any jvmarg parameters other than classpath' do + it 'should not have any jvmarg parameters other than classpath' do should contain_concat__fragment('collectd_plugin_genericjmx_conf_header').without_content(/(.*JVMArg.*){2,}/m) end end