File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# https://collectd.org/wiki/index.php/Plugin:GenericJMX
22class collectd::plugin::genericjmx (
3- $ensure = present ,
43 $jvmarg = [],
54) {
65 include collectd
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 ,
Original file line number Diff line number Diff line change 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
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
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
You can’t perform that action at this time.
0 commit comments