Skip to content

Commit

Permalink
Fix apm_enabled yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
NoodlesNZ committed Oct 25, 2018
1 parent 67372a6 commit 50156de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@
# lint:endignore
$base_extra_config = {
'apm_config' => {
'apm_enabled' => $apm_enabled,
'enabled' => $apm_enabled,
'env' => $apm_env,
'apm_non_local_traffic' => $apm_non_local_traffic
},
Expand Down
20 changes: 10 additions & 10 deletions spec/classes/datadog_agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@
'content' => /^apm_config:\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ apm_enabled: false\n/,
'content' => /^apm_config:\n\ \ enabled: false\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ apm_non_local_traffic: false\n/,
Expand All @@ -908,7 +908,7 @@
'content' => /^process_config:\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ enabled: disabled\n/,
'content' => /^process_config:\n\ \ enabled: disabled\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ scrub_args: true\n/,
Expand Down Expand Up @@ -1017,7 +1017,7 @@
'content' => /^apm_config:\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ apm_enabled: true\n/,
'content' => /^apm_config:\n\ \ enabled: true\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ foo: bar\n/,
Expand All @@ -1026,7 +1026,7 @@
'content' => /^\ \ bar: haz\n/,
)}
end

context 'with APM non local traffic enabled' do
let(:params) {{
:apm_enabled => true,
Expand All @@ -1037,7 +1037,7 @@
'content' => /^apm_config:\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ apm_enabled: true\n/,
'content' => /^apm_config:\n\ \ enabled: true\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ apm_non_local_traffic: true\n/,
Expand All @@ -1058,13 +1058,13 @@
'content' => /^apm_config:\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ apm_enabled: false\n/,
'content' => /^apm_config:\n\ \ enabled: false\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^process_config:\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ enabled: 'true'\n/,
'content' => /^process_config:\n\ \ enabled: 'true'\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ foo: bar\n/,
Expand All @@ -1088,7 +1088,7 @@
'content' => /^process_config:\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ enabled: disabled\n/,
'content' => /^process_config:\n\ \ enabled: disabled\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ foo: bar\n/,
Expand All @@ -1109,7 +1109,7 @@
'content' => /^process_config:\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ enabled: 'true'\n/,
'content' => /^process_config:\n\ \ enabled: 'true'\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ scrub_args: false\n/,
Expand All @@ -1128,7 +1128,7 @@
'content' => /^process_config:\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ enabled: 'true'\n/,
'content' => /^process_config:\n\ \ enabled: 'true'\n/,
)}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^\ \ scrub_args: true\n/,
Expand Down

0 comments on commit 50156de

Please sign in to comment.