summaryrefslogtreecommitdiff
path: root/spec/unit/knife
diff options
context:
space:
mode:
authorMarc A. Paradise <marc.paradise@gmail.com>2019-04-12 12:46:40 -0400
committerMarc A. Paradise <marc.paradise@gmail.com>2019-04-24 13:27:57 -0400
commit035363360d881d974fa1104b134fc95cbe53476d (patch)
tree56684b7b19a9da47693187407fd62dcc8db45158 /spec/unit/knife
parentcec221813641821b2d91126d43f8e7c4e2775321 (diff)
downloadchef-035363360d881d974fa1104b134fc95cbe53476d.tar.gz
Remove fips version check from bootstrap client.rb
The minimum available version of Chef Client for bootstrap is 12.20; FIPS support was added in 12.8. This change removes the minimum chef version check for fips in the client.rb generated by bootstrap. Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
Diffstat (limited to 'spec/unit/knife')
-rw-r--r--spec/unit/knife/core/bootstrap_context_spec.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/spec/unit/knife/core/bootstrap_context_spec.rb b/spec/unit/knife/core/bootstrap_context_spec.rb
index 4b8c78eb9e..7b12177ab9 100644
--- a/spec/unit/knife/core/bootstrap_context_spec.rb
+++ b/spec/unit/knife/core/bootstrap_context_spec.rb
@@ -206,15 +206,12 @@ describe Chef::Knife::Core::BootstrapContext do
Chef::Config[:fips] = true
end
- it "adds the chef version check" do
- expect(bootstrap_context.config_content).to include <<-CONFIG.gsub(/^ {8}/, "")
- fips true
- require "chef/version"
- chef_version = ::Chef::VERSION.split(".")
- unless chef_version[0].to_i > 12 || (chef_version[0].to_i == 12 && chef_version[1].to_i >= 20)
- raise "FIPS Mode requested but not supported by this client"
- end
- CONFIG
+ after do
+ Chef::Config.reset!
+ end
+
+ it "sets fips mode in the client.rb" do
+ expect(bootstrap_context.config_content).to match(/fips true/)
end
end