diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-10-12 20:43:09 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-10-12 20:56:24 -0700 |
commit | b93860e919d2fa2c6a878ac78140c1ef25036942 (patch) | |
tree | 0c55de20222522ac5611e1a09b1d98400dcebc5d /kitchen-tests | |
parent | fbde8dc0c3da8ae96e1cda3d36338779dff65ff1 (diff) | |
download | chef-b93860e919d2fa2c6a878ac78140c1ef25036942.tar.gz |
Add additional_config property
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'kitchen-tests')
4 files changed, 23 insertions, 1 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb index 71395d7364..4e096b1daa 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb @@ -88,6 +88,13 @@ include_recipe "::_chef_client_trusted_certificate" chef_client_config "Create chef-client's client.rb" do chef_server_url "https://localhost" chef_license "accept" + additional_config <<~CONFIG + begin + require 'aws-sdk' + rescue LoadError + Chef::Log.warn "Failed to load aws-sdk." + end + CONFIG end chef_client_cron "Run chef-client as a cron job" diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb index e06d1d1fc9..8307351ad7 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb @@ -44,6 +44,13 @@ include_recipe "::_chef_client_trusted_certificate" chef_client_config "Create chef-client's client.rb" do chef_server_url "https://localhost" chef_license "accept" + additional_config <<~CONFIG + begin + require 'aws-sdk' + rescue LoadError + Chef::Log.warn "Failed to load aws-sdk." + end + CONFIG end chef_client_launchd "Every 30 mins Infra Client run" do diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb index cc8643facf..486d680a3f 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb @@ -82,6 +82,13 @@ end chef_client_config "Create chef-client's client.rb" do chef_server_url "https://localhost" chef_license "accept" + additional_config <<~CONFIG + begin + require 'aws-sdk' + rescue LoadError + Chef::Log.warn "Failed to load aws-sdk." + end + CONFIG end include_recipe "::_chef_client_trusted_certificate" diff --git a/kitchen-tests/test/integration/end-to-end/default_spec.rb b/kitchen-tests/test/integration/end-to-end/default_spec.rb index a3f60273ad..3a0848a7e9 100644 --- a/kitchen-tests/test/integration/end-to-end/default_spec.rb +++ b/kitchen-tests/test/integration/end-to-end/default_spec.rb @@ -7,4 +7,5 @@ client_rb = if os.windows? describe file(client_rb) do its("content") { should match(%r{chef_server_url = "https://localhost"}) } its("content") { should match(/chef_license = "accept"/) } -end + its("content") { should match(/require 'aws-sdk'/) } +endx |