From 9f5a90afc315d6658028df82dafa1f26900ee338 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 2 Oct 2024 12:50:47 -0500 Subject: [PATCH] test fix Signed-off-by: Corey Hemminger --- kitchen.yml | 2 +- resources/automatev2.rb | 4 ++-- test/fixtures/cookbooks/test/recipes/automatev2.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index e2ef690..b2e1d20 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -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 diff --git a/resources/automatev2.rb b/resources/automatev2.rb index 650b802..4cd1962 100644 --- a/resources/automatev2.rb +++ b/resources/automatev2.rb @@ -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( @@ -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") } diff --git a/test/fixtures/cookbooks/test/recipes/automatev2.rb b/test/fixtures/cookbooks/test/recipes/automatev2.rb index 2536843..4b249f7 100644 --- a/test/fixtures/cookbooks/test/recipes/automatev2.rb +++ b/test/fixtures/cookbooks/test/recipes/automatev2.rb @@ -5,5 +5,5 @@ EOS products %w(automate infra-server builder desktop) accept_license true - skip_verify true + skip_preflight true end