Skip to content

Commit 6064813

Browse files
committed
remove the ensure parameter
I don't think it's really necessary anyways, since the conf.d dir is being purged
1 parent bb978ee commit 6064813

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

manifests/plugin/genericjmx.pp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# https://collectd.org/wiki/index.php/Plugin:GenericJMX
22
class collectd::plugin::genericjmx (
3-
$ensure = present,
43
$jvmarg = [],
54
) {
65
include collectd
@@ -10,7 +9,6 @@
109
$config_file = "${collectd::params::plugin_conf_dir}/15-genericjmx.conf"
1110

1211
concat { $config_file:
13-
ensure => $ensure,
1412
mode => '0640',
1513
owner => 'root',
1614
group => $collectd::params::root_group,

spec/classes/collectd_plugin_genericjmx_spec.rb

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
let (:config_filename) { '/etc/collectd/conf.d/15-genericjmx.conf' }
1212

13-
context ':ensure => present, defaults' do
13+
context 'defaults' do
1414
it 'will include the java plugin' do
1515
should contain_class('collectd::plugin::java')
1616
end
@@ -45,15 +45,6 @@
4545

4646
end
4747

48-
context ':ensure => absent' do
49-
let (:params) {{ :ensure => 'absent' }}
50-
it 'should not load the plugin' do
51-
should contain_concat(config_filename).with({
52-
:ensure => 'absent',
53-
})
54-
end
55-
end
56-
5748
context 'jvmarg parameter array' do
5849
let (:params) {{ :jvmarg => %w{ foo bar baz } }}
5950
it 'should have multiple jvmarg parameters' do
@@ -73,7 +64,7 @@
7364

7465
context 'jvmarg parameter empty' do
7566
let (:params) {{ :jvmarg => [] }}
76-
it 'should wnot have any jvmarg parameters other than classpath' do
67+
it 'should not have any jvmarg parameters other than classpath' do
7768
should contain_concat__fragment('collectd_plugin_genericjmx_conf_header').without_content(/(.*JVMArg.*){2,}/m)
7869
end
7970
end

0 commit comments

Comments
 (0)