diff options
author | tyler-ball <tball@chef.io> | 2018-12-19 16:17:14 -0700 |
---|---|---|
committer | Mark Anderson <mark@chef.io> | 2019-05-03 19:19:10 -0700 |
commit | b134493e65d73636d25aa569f9b77f9c0b4c3f88 (patch) | |
tree | b7969e6aea16fdedda9de9b3a344900438c00dd4 /spec/unit/application | |
parent | c83bdc4c6adefe29f15ae5bad9eb8f5a6ba30b7e (diff) | |
download | chef-b134493e65d73636d25aa569f9b77f9c0b4c3f88.tar.gz |
Adding in the license-acceptance flow
This adds a new feature to chef-client where users must accept the
EULA before using the product. Users can accept the license by
passing '--chef-license accept', setting ENV[CHEF_LICENSE]=accept or by
running 'chef-client' and following the interactive prompt.
Signed-off-by: tyler-ball <tball@chef.io>
Diffstat (limited to 'spec/unit/application')
-rw-r--r-- | spec/unit/application/knife_spec.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/unit/application/knife_spec.rb b/spec/unit/application/knife_spec.rb index 8a574b4d0f..f5ede6318b 100644 --- a/spec/unit/application/knife_spec.rb +++ b/spec/unit/application/knife_spec.rb @@ -45,6 +45,7 @@ describe Chef::Application::Knife do @knife = Chef::Application::Knife.new allow(@knife).to receive(:puts) allow(@knife).to receive(:trap) + allow(@knife).to receive(:check_license_acceptance) allow(Chef::Knife).to receive(:list_commands) end @@ -65,6 +66,7 @@ describe Chef::Application::Knife do with_argv(*%w{noop knife command with some args}) do knife = double(Chef::Knife) expect(Chef::Knife).to receive(:run).with(ARGV, @knife.options).and_return(knife) + expect(@knife).to receive(:check_license_acceptance) expect(@knife).to receive(:exit).with(0) @knife.run end @@ -75,11 +77,7 @@ describe Chef::Application::Knife do expect(@knife).to receive(:exit).with(0) @knife.run end - if windows? - expect(Chef::Config[:color]).to be_truthy - else - expect(Chef::Config[:color]).to be_truthy - end + expect(Chef::Config[:color]).to be_truthy end context "when given fips flags" do |