Skip to content

Commit

Permalink
remove the ensure parameter
Browse files Browse the repository at this point in the history
I don't think it's really necessary anyways, since the conf.d dir is
being purged
  • Loading branch information
kitchen committed Jan 22, 2015
1 parent bb978ee commit 6064813
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 0 additions & 2 deletions manifests/plugin/genericjmx.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# https://collectd.org/wiki/index.php/Plugin:GenericJMX
class collectd::plugin::genericjmx (
$ensure = present,
$jvmarg = [],
) {
include collectd
Expand All @@ -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,
Expand Down
13 changes: 2 additions & 11 deletions spec/classes/collectd_plugin_genericjmx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6064813

Please sign in to comment.