summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-02-28 12:14:56 -0800
committerTim Smith <tsmith84@gmail.com>2020-02-28 12:15:42 -0800
commitf9987b12ce8b988251b651d10ec2a479756c3e2e (patch)
tree30e6b7b4ff513c5c3b0bf17bb31c7885ee776407 /spec/support
parent7b7d1556dfdcbec9b78334b89ec8fae35e709fc0 (diff)
downloadchef-f9987b12ce8b988251b651d10ec2a479756c3e2e.tar.gz
Remove all the code that checks for Windows Nanonano_support
Windows Nano isn't a thing anymore so we shouldn't spending compute time checking to see if we're on Windows Nano Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/platform_helpers.rb5
-rw-r--r--spec/support/shared/functional/windows_script.rb17
2 files changed, 2 insertions, 20 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index c92b3dca39..f9d8955f1e 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -88,11 +88,6 @@ def windows_powershell_dsc?
supports_dsc
end
-def windows_nano_server?
- require "chef/platform/query_helpers"
- Chef::Platform.windows_nano_server?
-end
-
def windows_user_right?(right)
return false unless windows?
diff --git a/spec/support/shared/functional/windows_script.rb b/spec/support/shared/functional/windows_script.rb
index 49fd727055..eca63a6af3 100644
--- a/spec/support/shared/functional/windows_script.rb
+++ b/spec/support/shared/functional/windows_script.rb
@@ -99,7 +99,7 @@ shared_context Chef::Resource::WindowsScript do
end
end
- context "when the guard's architecture is specified as 32-bit", :not_supported_on_nano do
+ context "when the guard's architecture is specified as 32-bit" do
let (:guard_architecture) { :i386 }
it "executes a 32-bit guard" do
resource.only_if resource_guard_command, architecture: guard_architecture
@@ -107,17 +107,6 @@ shared_context Chef::Resource::WindowsScript do
expect(get_guard_process_architecture).to eq("x86")
end
end
-
- context "when the guard's architecture is specified as 32-bit", :windows_nano_only do
- let (:guard_architecture) { :i386 }
- it "raises an error" do
- resource.only_if resource_guard_command, architecture: guard_architecture
- expect { resource.run_action(:run) }.to raise_error(
- Chef::Exceptions::Win32ArchitectureIncorrect,
- /cannot execute script with requested architecture 'i386' on Windows Nano Server/
- )
- end
- end
end
end
@@ -218,8 +207,6 @@ shared_context Chef::Resource::WindowsScript do
context "when evaluating guards" do
it "has a guard_interpreter attribute set to the short name of the resource" do
- pending "powershell.exe always exits with 0 on nano" if Chef::Platform.windows_nano_server?
-
expect(resource.guard_interpreter).to eq(resource.resource_name)
resource.not_if "findstr.exe /thiscommandhasnonzeroexitstatus"
expect(Chef::Resource).to receive(:resource_for_node).and_call_original
@@ -238,7 +225,7 @@ shared_context Chef::Resource::WindowsScript do
it_behaves_like "a script resource with architecture attribute"
end
- context "when the architecture attribute is :i386", :not_supported_on_nano do
+ context "when the architecture attribute is :i386" do
let(:resource_architecture) { :i386 }
it_behaves_like "a script resource with architecture attribute"
end