Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions spec/classes/datadog_agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,39 @@
it { should contain_concat__fragment('datadog extra_template footer').with(
'content' => /^# extra template is here\n/,
)}
it { should_not contain_concat__fragment('datadog apm footer').with(
'order' => '07',
)}
end
context 'with APM enabled' do
let(:params) {{
:apm_enabled => true,
:apm_env => 'foo',
}}
it { should contain_concat__fragment('datadog apm footer').with(
'order' => '06',
)}
end
context 'with APM enabled but no APM env' do
let(:params) {{
:apm_enabled => true,
}}
it { should_not contain_concat__fragment('datadog apm footer').with(
'order' => '06',
)}
end
context 'with extra_template and APM enabled' do
let(:params) {{
:extra_template => 'custom_datadog/extra_template_test.erb',
:apm_enabled => true,
:apm_env => 'foo',
}}
it { should contain_concat__fragment('datadog extra_template footer').with(
'order' => '06',
)}
it { should contain_concat__fragment('datadog extra_template footer').with(
'content' => /^# extra template is here\n/,
)}
it { should contain_concat__fragment('datadog apm footer').with(
'order' => '07',
)}
Expand Down