Skip to content

Commit 29d0847

Browse files
committed
[datadog-agent][spec] check fragment contents instead.
1 parent 7af675a commit 29d0847

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

spec/classes/datadog_agent_spec.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -606,18 +606,18 @@
606606
end
607607

608608
context "with facts to tags set" do
609-
describe "make sure facts_array outputs a list of tags" do
610-
let(:params) { { puppet_run_reports: true, facts_to_tags: ['osfamily', 'facts_array']} }
609+
describe "ensure facts_array outputs a list of tags" do
610+
let(:params) { { puppet_run_reports: true, puppet_gem_provider: 'gem', facts_to_tags: ['osfamily', 'facts_array']} }
611611
let(:facts) do
612612
{
613-
operatingsystem: 'CentOS',
614-
osfamily: 'redhat',
615-
facts_array: ['one', 'two', 'three']
613+
operatingsystem: 'CentOS',
614+
osfamily: 'redhat',
615+
facts_array: ['one', 'two', 'three']
616616
}
617-
end
618617

619-
it { should contain_concat('/etc/dd-agent/datadog.conf').with_content(/tags: osfamily:redhat, facts_array:one, facts_array:two, facts_array:three/) }
618+
it { should contain_concat('/etc/dd-agent/datadog.conf') }
619+
it { should contain_concat__fragment('datadog tags').with(/tags: osfamily:redhat, facts_array:one, facts_array:two, facts_array:three/) }
620+
end
620621
end
621622
end
622-
623623
end

0 commit comments

Comments
 (0)