File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313 if !$::datadog_agent::agent5_enable {
1414 $dst = " ${datadog_agent::conf6_dir} /${integration} .d/conf.yaml"
15+ file { "${datadog_agent::conf6_dir}/${integration}.d" :
16+ ensure => directory ,
17+ owner => $datadog_agent::dd_user ,
18+ group => $datadog_agent::dd_group ,
19+ mode => ' 0755' ,
20+ before => File [$dst ]
21+ }
1522 } else {
1623 $dst = " ${datadog_agent::conf_dir} /${integration} .yaml"
1724 }
Original file line number Diff line number Diff line change 88 if enabled
99 let ( :conf_file ) { '/etc/dd-agent/conf.d/test.yaml' }
1010 else
11- let ( :conf_file ) { '/etc/datadog-agent/conf.d/test.d/conf.yaml' }
11+ let ( :conf_dir ) { '/etc/datadog-agent/conf.d/test.d' }
12+ let ( :conf_file ) { "#{ conf_dir } /conf.yaml" }
1213 end
1314
1415 let ( :title ) { "test" }
2324 { 'one' => "two" }
2425 ]
2526 } }
27+
28+
2629 it { should compile }
30+ if enabled
31+ it { should contain_file ( "#{ conf_dir } " ) . that_comes_before ( "File[#{ conf_file } ]" ) }
32+ end
2733 it { should contain_file ( "#{ conf_file } " ) . with_content ( /init_config: / ) }
2834 gem_spec = Gem . loaded_specs [ 'puppet' ]
2935 if gem_spec . version >= Gem ::Version . new ( '4.0.0' )
You can’t perform that action at this time.
0 commit comments