Skip to content

Commit

Permalink
[puppet][legacy] fix spec tests for older puppets.
Browse files Browse the repository at this point in the history
  • Loading branch information
truthbk committed Sep 20, 2016
1 parent d80d16a commit 9d77765
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spec/defines/datadog_agent__integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
}}
it { should compile }
it { should contain_file('/etc/dd-agent/conf.d/test.yaml').with_content(/init_config: /) }
it { should contain_file('/etc/dd-agent/conf.d/test.yaml').with_content(/---\ninit_config: \ninstances:\n- one: two\n/) }
gem_spec = Gem.loaded_specs['puppet']
if gem_spec.version >= Gem::Version.new('4.0.0')
it { should contain_file('/etc/dd-agent/conf.d/test.yaml').with_content(/---\ninit_config: \ninstances:\n- one: two\n/) }
else
it { should contain_file('/etc/dd-agent/conf.d/test.yaml').with_content(/--- \n init_config: \n instances: \n - one: two/) }
end
it { should contain_file('/etc/dd-agent/conf.d/test.yaml').that_notifies("Service[datadog-agent]") }
end

0 comments on commit 9d77765

Please sign in to comment.