Skip to content

Commit 009f344

Browse files
committed
[datadog-agent][spec] check fragment contents instead.
1 parent 4e766bf commit 009f344

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

spec/classes/datadog_agent_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -565,18 +565,18 @@
565565
end
566566

567567
context "with facts to tags set" do
568-
describe "make sure facts_array outputs a list of tags" do
569-
let(:params) { { puppet_run_reports: true, facts_to_tags: ['osfamily', 'facts_array']} }
568+
describe "ensure facts_array outputs a list of tags" do
569+
let(:params) { { puppet_run_reports: true, puppet_gem_provider: 'gem', facts_to_tags: ['osfamily', 'facts_array']} }
570570
let(:facts) do
571571
{
572-
operatingsystem: 'CentOS',
573-
osfamily: 'redhat',
574-
facts_array: ['one', 'two', 'three']
572+
operatingsystem: 'CentOS',
573+
osfamily: 'redhat',
574+
facts_array: ['one', 'two', 'three']
575575
}
576-
end
577576

578-
it { should contain_concat('/etc/dd-agent/datadog.conf').with_content(/tags: osfamily:redhat, facts_array:one, facts_array:two, facts_array:three/) }
577+
it { should contain_concat('/etc/dd-agent/datadog.conf') }
578+
it { should contain_concat__fragment('datadog tags').with(/tags: osfamily:redhat, facts_array:one, facts_array:two, facts_array:three/) }
579+
end
579580
end
580581
end
581-
582582
end

0 commit comments

Comments
 (0)