diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-07-16 16:01:08 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-07-16 18:41:27 -0700 |
commit | 6c1b0b65afab4897e67fc21fae16a2e77a632eca (patch) | |
tree | a0bfbcb8b544ef7215ffd7281f19b975c94e4970 /spec/support | |
parent | b6d4990724237f58d0c6beb17eaf2268c894579e (diff) | |
download | chef-6c1b0b65afab4897e67fc21fae16a2e77a632eca.tar.gz |
Reset logger in test to avoid global state persisting.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared/integration/knife_support.rb | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/spec/support/shared/integration/knife_support.rb b/spec/support/shared/integration/knife_support.rb index 79acc202d2..af7b503d16 100644 --- a/spec/support/shared/integration/knife_support.rb +++ b/spec/support/shared/integration/knife_support.rb @@ -52,8 +52,6 @@ module KnifeSupport STDIN end - old_loggers = Chef::Log.loggers - old_log_level = Chef::Log.level begin puts "knife: #{args.join(" ")}" if DEBUG subcommand_class = Chef::Knife.subcommand_class_from(args) @@ -112,8 +110,6 @@ module KnifeSupport rescue SystemExit => e exit_code = e.status ensure - Chef::Log.use_log_devices(old_loggers) - Chef::Log.level = old_log_level Chef::Config.delete(:syntax_check_cache_path) Chef::Config.delete(:concurrency) end |