diff --git a/.kitchen.yml b/.kitchen.yml index b3fdf1b4..41bc3d93 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -44,6 +44,14 @@ suites: api_key: somethingnotnil application_key: alsonotnil +- name: dd-handler + run_list: + - recipe[datadog::dd-handler] + attributes: + datadog: &DATADOG + api_key: somethingnotnil + application_key: alsonotnil + - name: datadog_activemq run_list: - recipe[datadog::activemq] diff --git a/recipes/dd-handler.rb b/recipes/dd-handler.rb index f0b99bf9..2622447d 100644 --- a/recipes/dd-handler.rb +++ b/recipes/dd-handler.rb @@ -20,9 +20,11 @@ include_recipe 'chef_handler' ENV['DATADOG_HOST'] = node['datadog']['url'] -chef_gem 'chef-handler-datadog' do +chef_gem 'chef-handler-datadog' do # ~FC009 action :install version node['datadog']['chef_handler_version'] + # Chef 12 introduced `compile_time` - remove when Chef 11 is EOL. + compile_time true if respond_to?(:compile_time) end require 'chef/handler/datadog' diff --git a/test/integration/dd-handler/serverspec/dd-handler_spec.rb b/test/integration/dd-handler/serverspec/dd-handler_spec.rb new file mode 100644 index 00000000..bfd18943 --- /dev/null +++ b/test/integration/dd-handler/serverspec/dd-handler_spec.rb @@ -0,0 +1,8 @@ +require 'serverspec' + +set :backend, :exec +set :path, '/sbin:/usr/local/sbin:$PATH' + +describe package('chef-handler-datadog') do + it { should be_installed.by('gem') } +end