Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
Signed-off-by: Corey Hemminger <[email protected]>
  • Loading branch information
Stromweld committed Oct 2, 2024
1 parent ffaa63a commit 9f5a90a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ suites:
named_run_list: test_inspec

- name: chef-server
includes: ['almalinux-8', 'almalinux-9', 'rockylinux-8', 'rockylinux-9', 'ubuntu-20.04', 'ubuntu-22.04', 'ubuntu-24.04']
includes: ['almalinux-8', 'almalinux-9', 'rockylinux-8', 'rockylinux-9', 'ubuntu-20.04', 'ubuntu-22.04']
named_run_list: test_chef_server

- name: chef-automatev2
Expand Down
4 changes: 2 additions & 2 deletions resources/automatev2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
property :config, String, required: true
property :accept_license, [true, false], default: false
property :products, Array, default: ['automate']
property :skip_verify, [TrueClass, FalseClass], default: false
property :skip_preflight, [TrueClass, FalseClass], default: false

action :create do
bin_path = value_for_platform_family(
Expand Down Expand Up @@ -52,7 +52,7 @@
only_if { FileTest.file?('/usr/local/bin/chef-automate') }
end

execute "/usr/local/bin/chef-automate deploy #{Chef::Config[:file_cache_path]}/config.toml#{' --skip-verify' if new_resource.skip_verify} --product #{new_resource.products.join(' --product ')}#{' --accept-terms-and-mlsa' if new_resource.accept_license}" do
execute "/usr/local/bin/chef-automate deploy #{Chef::Config[:file_cache_path]}/config.toml#{' --skip-preflight' if new_resource.skip_preflight} --product #{new_resource.products.join(' --product ')}#{' --accept-terms-and-mlsa' if new_resource.accept_license}" do
cwd Chef::Config[:file_cache_path]
live_stream true
only_if { FileTest.file?("#{Chef::Config[:file_cache_path]}/config.toml") }
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/cookbooks/test/recipes/automatev2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
EOS
products %w(automate infra-server builder desktop)
accept_license true
skip_verify true
skip_preflight true
end

0 comments on commit 9f5a90a

Please sign in to comment.