File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 agents . each do |_ , enabled |
77 let ( :pre_condition ) { "class {'::datadog_agent': agent5_enable => #{ enabled } }" }
88 if enabled
9- let ( :conf_dir ) { '/etc/dd-agent/conf.d' }
9+ let ( :conf_file ) { '/etc/dd-agent/conf.d/test.yaml ' }
1010 else
11- let ( :conf_dir ) { '/etc/datadog-agent/conf.d' }
11+ let ( :conf_file ) { '/etc/datadog-agent/conf.d/test.d/conf.yaml ' }
1212 end
1313
1414 let ( :title ) { "test" }
2424 ]
2525 } }
2626 it { should compile }
27- it { should contain_file ( "#{ conf_dir } /test.yaml " ) . with_content ( /init_config: / ) }
27+ it { should contain_file ( "#{ conf_file } " ) . with_content ( /init_config: / ) }
2828 gem_spec = Gem . loaded_specs [ 'puppet' ]
2929 if gem_spec . version >= Gem ::Version . new ( '4.0.0' )
30- it { should contain_file ( "#{ conf_dir } /test.yaml " ) . with_content ( /---\n init_config: \n instances:\n - one: two\n / ) }
30+ it { should contain_file ( "#{ conf_file } " ) . with_content ( /---\n init_config: \n instances:\n - one: two\n / ) }
3131 else
32- it { should contain_file ( "#{ conf_dir } /test.yaml " ) . with_content ( /--- \n init_config: \n instances: \n - one: two/ ) }
32+ it { should contain_file ( "#{ conf_file } " ) . with_content ( /--- \n init_config: \n instances: \n - one: two/ ) }
3333 end
34- it { should contain_file ( "#{ conf_dir } /test.yaml " ) . that_notifies ( "Service[datadog-agent]" ) }
34+ it { should contain_file ( "#{ conf_file } " ) . that_notifies ( "Service[datadog-agent]" ) }
3535 end
3636 end
3737end
You can’t perform that action at this time.
0 commit comments