summaryrefslogtreecommitdiff
path: root/spec/unit/knife
diff options
context:
space:
mode:
authorMark Anderson <mark@chef.io>2019-05-03 17:43:20 -0700
committerMark Anderson <mark@chef.io>2019-05-03 21:40:19 -0700
commit629d5d05820f4f9feda468c558675fd4432b9809 (patch)
treebd52cc14fea5153335c9ac3c2a18d63a91401d12 /spec/unit/knife
parentc99eef4077655ce0a8db87d7c9ead1017ec7dad7 (diff)
downloadchef-629d5d05820f4f9feda468c558675fd4432b9809.tar.gz
Fix 2 minute pause while we wait for license acceptance cli to time out
Signed-off-by: Mark Anderson <mark@chef.io>
Diffstat (limited to 'spec/unit/knife')
-rw-r--r--spec/unit/knife/core/windows_bootstrap_context_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/knife/core/windows_bootstrap_context_spec.rb b/spec/unit/knife/core/windows_bootstrap_context_spec.rb
index a19ad11247..6a21a18884 100644
--- a/spec/unit/knife/core/windows_bootstrap_context_spec.rb
+++ b/spec/unit/knife/core/windows_bootstrap_context_spec.rb
@@ -220,6 +220,8 @@ describe Chef::Knife::Core::WindowsBootstrapContext do
let(:bootstrap) { Chef::Knife::Bootstrap.new(["--bootstrap-install-command", "chef-client"]) }
before do
bootstrap.config[:bootstrap_install_command] = "chef-client"
+ @old_env = ENV["CHEF_LICENSE"]
+ ENV["CHEF_LICENSE"] = "accept"
end
it "sets the bootstrap_install_command option under Chef::Config::Knife object" do
@@ -229,6 +231,7 @@ describe Chef::Knife::Core::WindowsBootstrapContext do
after do
bootstrap.config.delete(:bootstrap_install_command)
Chef::Config[:knife].delete(:bootstrap_install_command)
+ ENV["CHEF_LICENSE"] = @old_env
end
end
@@ -245,6 +248,8 @@ describe Chef::Knife::Core::WindowsBootstrapContext do
let(:bootstrap) { Chef::Knife::Bootstrap.new(["--bootstrap-install-command", "chef-client"]) }
before do
bootstrap.config[:bootstrap_install_command] = "chef-client"
+ @old_env = ENV["CHEF_LICENSE"]
+ ENV["CHEF_LICENSE"] = "accept"
end
it "sets the bootstrap_install_command option under Chef::Config::Knife object" do
@@ -254,6 +259,7 @@ describe Chef::Knife::Core::WindowsBootstrapContext do
after do
bootstrap.config.delete(:bootstrap_install_command)
Chef::Config[:knife].delete(:bootstrap_install_command)
+ ENV["CHEF_LICENSE"] = @old_env
end
end