diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-01-03 10:58:55 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-01-16 12:18:48 -0800 |
commit | 20470f104db79864b5aa871eb17e72f4884d25b5 (patch) | |
tree | 4e6cddbde8eb9c83d4049fbc90c0422c611edce5 /spec | |
parent | 4bc193401a089719fa9017a653dd0e8357efb484 (diff) | |
download | chef-20470f104db79864b5aa871eb17e72f4884d25b5.tar.gz |
Remove support for Windows 7 / 2008 from windows_featureremove_2008_feature
These are EOL platforms that we no longer produce artifacts for. Let's
simplify / speedup these resources by removing legacy platform checks.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/resource/windows_feature_dism_spec.rb | 21 | ||||
-rw-r--r-- | spec/unit/resource/windows_feature_powershell_spec.rb | 21 |
2 files changed, 6 insertions, 36 deletions
diff --git a/spec/unit/resource/windows_feature_dism_spec.rb b/spec/unit/resource/windows_feature_dism_spec.rb index 87d99ecbaf..bc6ca3adeb 100644 --- a/spec/unit/resource/windows_feature_dism_spec.rb +++ b/spec/unit/resource/windows_feature_dism_spec.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2018, Chef Software, Inc. +# Copyright:: Copyright 2018-2020, Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,7 +32,6 @@ describe Chef::Resource::WindowsFeatureDism do end it "the feature_name property is the name_property" do - node.automatic[:platform_version] = "6.2.9200" expect(resource.feature_name).to eql(%w{snmp dhcp}) end @@ -46,27 +45,13 @@ describe Chef::Resource::WindowsFeatureDism do expect { resource.action :remove }.not_to raise_error end - it "coerces comma separated lists of features to a lowercase array on 2012+" do - node.automatic[:platform_version] = "6.2.9200" + it "coerces comma separated lists of features to a lowercase array" do resource.feature_name "SNMP, DHCP" expect(resource.feature_name).to eql(%w{snmp dhcp}) end - it "coerces a single feature as a String to a lowercase array on 2012+" do - node.automatic[:platform_version] = "6.2.9200" + it "coerces a single feature as a String to a lowercase array" do resource.feature_name "SNMP" expect(resource.feature_name).to eql(["snmp"]) end - - it "coerces comma separated lists of features to an array, but preserves case on < 2012" do - node.automatic[:platform_version] = "6.1.7601" - resource.feature_name "SNMP, DHCP" - expect(resource.feature_name).to eql(%w{SNMP DHCP}) - end - - it "coerces a single feature as a String to an array, but preserves case on < 2012" do - node.automatic[:platform_version] = "6.1.7601" - resource.feature_name "SNMP" - expect(resource.feature_name).to eql(["SNMP"]) - end end diff --git a/spec/unit/resource/windows_feature_powershell_spec.rb b/spec/unit/resource/windows_feature_powershell_spec.rb index 3dc1604361..2d199ea809 100644 --- a/spec/unit/resource/windows_feature_powershell_spec.rb +++ b/spec/unit/resource/windows_feature_powershell_spec.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2018, Chef Software, Inc. +# Copyright:: Copyright 2018-2020, Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,7 +32,6 @@ describe Chef::Resource::WindowsFeaturePowershell do end it "the feature_name property is the name_property" do - node.automatic[:platform_version] = "6.2.9200" expect(resource.feature_name).to eql(%w{snmp dhcp}) end @@ -46,27 +45,13 @@ describe Chef::Resource::WindowsFeaturePowershell do expect { resource.action :remove }.not_to raise_error end - it "coerces comma separated lists of features to a lowercase array on 2012+" do - node.automatic[:platform_version] = "6.2.9200" + it "coerces comma separated lists of features to a lowercase array" do resource.feature_name "SNMP, DHCP" expect(resource.feature_name).to eql(%w{snmp dhcp}) end - it "coerces a single feature as a String to a lowercase array on 2012+" do - node.automatic[:platform_version] = "6.2.9200" + it "coerces a single feature as a String to a lowercase array" do resource.feature_name "SNMP" expect(resource.feature_name).to eql(["snmp"]) end - - it "coerces comma separated lists of features to an array, but preserves case on < 2012" do - node.automatic[:platform_version] = "6.1.7601" - resource.feature_name "SNMP, DHCP" - expect(resource.feature_name).to eql(%w{SNMP DHCP}) - end - - it "coerces a single feature as a String to an array, but preserves case on < 2012" do - node.automatic[:platform_version] = "6.1.7601" - resource.feature_name "SNMP" - expect(resource.feature_name).to eql(["SNMP"]) - end end |