Commit 15c67f7 1 parent 23a0720 commit 15c67f7 Copy full SHA for 15c67f7
File tree 5 files changed +36
-4
lines changed
custom_fixtures/custom_datadog/templates
5 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,5 @@ fixtures:
9
9
ruby : " git://github.com/puppetlabs/puppetlabs-ruby.git"
10
10
remote_file : " git://github.com/lwf/puppet-remote_file.git"
11
11
symlinks :
12
+ custom_datadog : " #{source_dir}/spec/custom_fixtures/custom_datadog"
12
13
datadog_agent : " #{source_dir}"
Original file line number Diff line number Diff line change @@ -14,9 +14,11 @@ group :test do
14
14
end
15
15
16
16
group :development do
17
- gem "beaker" , '2.51.0'
18
17
gem "beaker-rspec"
19
- gem "puppet-blacksmith"
20
- gem "nokogiri" , "~> 1.6.0"
18
+ gem "beaker" , '2.51.0'
21
19
gem "guard-rake"
20
+ gem "hiera-eyaml"
21
+ gem "nokogiri" , "~> 1.6.0"
22
+ gem "puppet-blacksmith"
23
+ gem "xmlrpc" if RUBY_VERSION >= '2.3'
22
24
end
Original file line number Diff line number Diff line change 405
405
order => ' 05' ,
406
406
}
407
407
408
+ if ($extra_template != ' ' ) {
409
+ concat::fragment { 'datadog extra_template footer' :
410
+ target => ' /etc/dd-agent/datadog.conf' ,
411
+ content => template ($extra_template ),
412
+ order => ' 06' ,
413
+ }
414
+ $apm_footer_order = ' 07'
415
+ } else {
416
+ $apm_footer_order = ' 06'
417
+ }
418
+
408
419
concat::fragment { 'datadog apm footer' :
409
420
target => ' /etc/dd-agent/datadog.conf' ,
410
421
content => template (' datadog_agent/datadog_apm_footer.conf.erb' ),
411
- order => ' 06 ' ,
422
+ order => $apm_footer_order ,
412
423
}
413
424
414
425
Original file line number Diff line number Diff line change 568
568
it { should contain_concat__fragment ( 'datadog apm footer' ) . with (
569
569
'content' => /^env: foo\n / ,
570
570
) }
571
+ it { should contain_concat__fragment ( 'datadog apm footer' ) . with (
572
+ 'order' => '06' ,
573
+ ) }
571
574
end
572
575
context 'with service_discovery enabled' do
573
576
let ( :params ) {
593
596
'content' => /^sd_jmx_enable: true\n / ,
594
597
) }
595
598
end
599
+ context 'with extra_template enabled' do
600
+ let ( :params ) {
601
+ { :extra_template => 'custom_datadog/extra_template_test.erb' ,
602
+ } }
603
+ it { should contain_concat__fragment ( 'datadog extra_template footer' ) . with (
604
+ 'order' => '06' ,
605
+ ) }
606
+ it { should contain_concat__fragment ( 'datadog extra_template footer' ) . with (
607
+ 'content' => /^# extra template is here\n / ,
608
+ ) }
609
+ it { should contain_concat__fragment ( 'datadog apm footer' ) . with (
610
+ 'order' => '07' ,
611
+ ) }
612
+ end
596
613
end
597
614
end
598
615
Original file line number Diff line number Diff line change
1
+ # extra template is here
You can’t perform that action at this time.
0 commit comments