diff options
author | smriti <sgarg@msystechnologies.com> | 2021-06-04 14:58:38 +0530 |
---|---|---|
committer | smriti <sgarg@msystechnologies.com> | 2021-06-10 18:58:44 +0530 |
commit | 4fe60f40fa4613ff3a4e4272b9c1ee2e1acc9772 (patch) | |
tree | 53d65aa334e6dddbec79b82dff84ba81e7f492b1 | |
parent | 0bc0a13cbc5775a34fbc2984f3abf5d13897f60d (diff) | |
download | chef-4fe60f40fa4613ff3a4e4272b9c1ee2e1acc9772.tar.gz |
knife bootstrap window: log_level should be updated as in client.rb
Signed-off-by: smriti <sgarg@msystechnologies.com>
-rw-r--r-- | knife/lib/chef/knife/core/windows_bootstrap_context.rb | 4 | ||||
-rw-r--r-- | knife/spec/unit/knife/core/windows_bootstrap_context_spec.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/knife/lib/chef/knife/core/windows_bootstrap_context.rb b/knife/lib/chef/knife/core/windows_bootstrap_context.rb index 2904a231a5..c67ecdd645 100644 --- a/knife/lib/chef/knife/core/windows_bootstrap_context.rb +++ b/knife/lib/chef/knife/core/windows_bootstrap_context.rb @@ -86,8 +86,8 @@ class Chef client_rb << "# Using default node name (fqdn)\n" end - if config[:config_log_level] - client_rb << %Q{log_level :#{config[:config_log_level]}\n} + if chef_config[:config_log_level] + client_rb << %Q{log_level :#{chef_config[:config_log_level]}\n} else client_rb << "log_level :auto\n" end diff --git a/knife/spec/unit/knife/core/windows_bootstrap_context_spec.rb b/knife/spec/unit/knife/core/windows_bootstrap_context_spec.rb index af656facf0..3998a380dc 100644 --- a/knife/spec/unit/knife/core/windows_bootstrap_context_spec.rb +++ b/knife/spec/unit/knife/core/windows_bootstrap_context_spec.rb @@ -169,7 +169,7 @@ describe Chef::Knife::Core::WindowsBootstrapContext do echo.file_backup_path "C:\\\\chef\\\\backup" echo.cache_options ^({:path =^> "C:\\\\chef\\\\cache\\\\checksums", :skip_expires =^> true}^) echo.# Using default node name ^(fqdn^) - echo.log_level :auto + echo.log_level :info echo.log_location STDOUT EXPECTED expect(bootstrap_context.config_content).to eq expected |