From 40c6dd08cbd8fdfe022dd472dab1b5547c855500 Mon Sep 17 00:00:00 2001 From: Olivier Vielpeau Date: Mon, 19 Sep 2016 18:38:14 +0200 Subject: [PATCH] [yum_repository] Use `:create` action instead of deprecated `:add` `:add` is an alias of `:create` since version 3.0 of the `yum` cookbook so it's safe to use `:create` --- recipes/repository.rb | 2 +- spec/dd-agent_spec.rb | 2 +- spec/repository_spec.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/repository.rb b/recipes/repository.rb index 5652793d..0a74f072 100644 --- a/recipes/repository.rb +++ b/recipes/repository.rb @@ -45,6 +45,6 @@ proxy_username node['datadog']['yumrepo_proxy_username'] proxy_password node['datadog']['yumrepo_proxy_password'] gpgkey node['datadog']['yumrepo_gpgkey'] - action :add + action :create end end diff --git a/spec/dd-agent_spec.rb b/spec/dd-agent_spec.rb index e7e94525..bac6c753 100644 --- a/spec/dd-agent_spec.rb +++ b/spec/dd-agent_spec.rb @@ -33,7 +33,7 @@ def set_env_var(name, value) shared_examples_for 'rhellions repo' do it 'sets up a yum repo' do - expect(chef_run).to add_yum_repository('datadog') + expect(chef_run).to create_yum_repository('datadog') end end diff --git a/spec/repository_spec.rb b/spec/repository_spec.rb index 64fc13fc..89344124 100644 --- a/spec/repository_spec.rb +++ b/spec/repository_spec.rb @@ -11,7 +11,7 @@ end it 'sets up a yum repo' do - expect(chef_run).to add_yum_repository('datadog').with( + expect(chef_run).to create_yum_repository('datadog').with( gpgkey: 'http://yum.datadoghq.com/DATADOG_RPM_KEY.public' ) end @@ -28,7 +28,7 @@ end it 'sets up a yum repo' do - expect(chef_run).to add_yum_repository('datadog').with( + expect(chef_run).to create_yum_repository('datadog').with( gpgkey: 'https://yum.datadoghq.com/DATADOG_RPM_KEY.public' ) end