summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorHui Hu <huh@vmware.com>2014-03-07 18:24:36 +0800
committerBryan McLellan <btm@getchef.com>2014-03-28 15:57:17 -0700
commit78c9c5261d07d71a4649286979c2fd4605c69bcf (patch)
tree7f6febfc205dbfb7ec88be8252c3c2c58dd1af31 /spec/unit
parent379052dc136d515f08485ac9a35b73173b7647d0 (diff)
downloadchef-78c9c5261d07d71a4649286979c2fd4605c69bcf.tar.gz
[CHEF-3610] Set log_level for chef-client when '-VV' is specified in the knife command
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/knife/core/bootstrap_context_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/knife/core/bootstrap_context_spec.rb b/spec/unit/knife/core/bootstrap_context_spec.rb
index 3b166443b6..17e265edad 100644
--- a/spec/unit/knife/core/bootstrap_context_spec.rb
+++ b/spec/unit/knife/core/bootstrap_context_spec.rb
@@ -41,6 +41,13 @@ describe Chef::Knife::Core::BootstrapContext do
bootstrap_context.start_chef.should eq "chef-client -j /etc/chef/first-boot.json -E _default"
end
+ describe "when in verbosity mode" do
+ let(:config) { {:verbosity => 2} }
+ it "adds '-l debug' when verbosity is >= 2" do
+ bootstrap_context.start_chef.should eq "chef-client -j /etc/chef/first-boot.json -l debug -E _default"
+ end
+ end
+
it "reads the validation key" do
bootstrap_context.validation_key.should eq IO.read(File.join(CHEF_SPEC_DATA, 'ssl', 'private_key.pem'))
end