diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-05-15 10:52:17 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-05-15 10:52:17 -0700 |
commit | d3b0f2ce30e4a8cbcbdd0c7128f4ae710a189e83 (patch) | |
tree | a4c129fb401e234bd767602ff9d097235ce7059a /spec | |
parent | b086721ca70750277c407fd0cc573a08f076649f (diff) | |
download | chef-d3b0f2ce30e4a8cbcbdd0c7128f4ae710a189e83.tar.gz |
change default log_location + log_level for knife
send logging to STDERR and drop default log_level to :warn
so that we can see warnings again. logging needs to go to
STDERR so that we don't break someone's 'API' where they're piping
stdin to some filter. we believe the log_level was not warn
in order to suppress warns off of 404s which no longer warn by
default now.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/knife_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/knife_spec.rb b/spec/unit/knife_spec.rb index 7cb16aae2a..7aab16ce99 100644 --- a/spec/unit/knife_spec.rb +++ b/spec/unit/knife_spec.rb @@ -252,6 +252,18 @@ describe Chef::Knife do :default => "default-value") end + it "sets the default log_location to STDERR for Chef::Log warnings" do + knife_command = KnifeSpecs::TestYourself.new([]) + knife_command.configure_chef + expect(Chef::Config[:log_location]).to eq(STDERR) + end + + it "sets the default log_level to warn so we can issue Chef::Log.warn" do + knife_command = KnifeSpecs::TestYourself.new([]) + knife_command.configure_chef + expect(Chef::Config[:log_level]).to eql(:warn) + end + it "prefers the default value if no config or command line value is present" do knife_command = KnifeSpecs::TestYourself.new([]) #empty argv knife_command.configure_chef |