summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/application.rb7
-rw-r--r--spec/integration/client/client_spec.rb18
2 files changed, 6 insertions, 19 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb
index d5b0847f11..2970921d1e 100644
--- a/lib/chef/application.rb
+++ b/lib/chef/application.rb
@@ -251,7 +251,12 @@ class Chef
end
def check_license_acceptance
- LicenseAcceptance::Acceptor.check_and_persist!("chef-client", Chef::VERSION.to_s, logger: logger)
+ LicenseAcceptance::Acceptor.check_and_persist!(
+ "infra-client",
+ Chef::VERSION.to_s,
+ logger: logger,
+ provided: Chef::Config[:chef_license]
+ )
end
# Actually run the application
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb
index 23f262ad02..cde25662c1 100644
--- a/spec/integration/client/client_spec.rb
+++ b/spec/integration/client/client_spec.rb
@@ -60,24 +60,6 @@ describe "chef-client" do
shell_out!("#{chef_client} -c \"#{path_to('config/client.rb')}\" -o 'x::default'", cwd: chef_dir)
end
- it "should complete successfully with no other environment variables", skip: (Chef::Platform.windows?) do
- file "config/client.rb", <<~EOM
- local_mode true
- cookbook_path "#{path_to('cookbooks')}"
- # One environment variable we DO need to prevent hanging
- ENV["CHEF_LICENSE"] = "accept-no-persist"
- EOM
-
- begin
- result = shell_out("env -i #{critical_env_vars} #{chef_client} -c \"#{path_to('config/client.rb')}\" -o 'x::default'", cwd: chef_dir)
- result.error!
- rescue
- Chef::Log.info "Bare invocation will have the following load-path."
- Chef::Log.info shell_out!("env -i #{critical_env_vars} ruby -e 'puts $:'").stdout
- raise
- end
- end
-
it "should complete successfully with --no-listen" do
file "config/client.rb", <<~EOM
local_mode true