diff options
Diffstat (limited to 'spec/functional')
-rw-r--r-- | spec/functional/event_loggers/windows_eventlog_spec.rb | 4 | ||||
-rw-r--r-- | spec/functional/resource/link_spec.rb | 8 | ||||
-rw-r--r-- | spec/functional/resource/powershell_script_spec.rb | 2 | ||||
-rw-r--r-- | spec/functional/win32/security_spec.rb | 1 | ||||
-rw-r--r-- | spec/functional/win32/versions_spec.rb | 16 |
5 files changed, 10 insertions, 21 deletions
diff --git a/spec/functional/event_loggers/windows_eventlog_spec.rb b/spec/functional/event_loggers/windows_eventlog_spec.rb index 019595ea8d..8a9475680d 100644 --- a/spec/functional/event_loggers/windows_eventlog_spec.rb +++ b/spec/functional/event_loggers/windows_eventlog_spec.rb @@ -19,12 +19,12 @@ require "spec_helper" require "securerandom" require "chef/event_loggers/windows_eventlog" -if Chef::Platform.windows? && (not Chef::Platform.windows_server_2003?) +if Chef::Platform.windows? require "win32/eventlog" include Win32 end -describe Chef::EventLoggers::WindowsEventLogger, :windows_only, :not_supported_on_win2k3 do +describe Chef::EventLoggers::WindowsEventLogger, :windows_only do def rand random.rand(1 << 32).to_s end diff --git a/spec/functional/resource/link_spec.rb b/spec/functional/resource/link_spec.rb index e8a95436f7..8073bbc92e 100644 --- a/spec/functional/resource/link_spec.rb +++ b/spec/functional/resource/link_spec.rb @@ -172,7 +172,7 @@ describe Chef::Resource::Link do create_resource end - describe "when supported on platform", :not_supported_on_win2k3 do + describe "when supported on platform" do shared_examples_for "delete errors out" do it "delete errors out" do expect { resource.run_action(:delete) }.to raise_error(Chef::Exceptions::Link) @@ -694,10 +694,4 @@ describe Chef::Resource::Link do end end end - - describe "when not supported on platform", :win2k3_only do - it "raises error" do - expect { resource }.to raise_error(Chef::Exceptions::Win32APIFunctionNotImplemented) - end - end end diff --git a/spec/functional/resource/powershell_script_spec.rb b/spec/functional/resource/powershell_script_spec.rb index af345b0ea4..bbd304fd06 100644 --- a/spec/functional/resource/powershell_script_spec.rb +++ b/spec/functional/resource/powershell_script_spec.rb @@ -36,8 +36,6 @@ describe Chef::Resource::WindowsScript::PowershellScript, :windows_only do let(:cmdlet_exit_code_success_content) { "get-item ." } let(:windows_process_exit_code_success_content) { "#{ENV['SystemRoot']}\\system32\\attrib.exe $env:systemroot" } let(:windows_process_exit_code_not_found_content) { "findstr /notavalidswitch" } - # Note that process exit codes on 32-bit Win2k3 cannot - # exceed maximum value of signed integer let(:arbitrary_nonzero_process_exit_code) { 4193 } let(:arbitrary_nonzero_process_exit_code_content) { "exit #{arbitrary_nonzero_process_exit_code}" } let(:invalid_powershell_interpreter_flag) { "/thisflagisinvalid" } diff --git a/spec/functional/win32/security_spec.rb b/spec/functional/win32/security_spec.rb index 6c24cbec08..22c749b609 100644 --- a/spec/functional/win32/security_spec.rb +++ b/spec/functional/win32/security_spec.rb @@ -42,7 +42,6 @@ describe "Chef::Win32::Security", :windows_only do before do allow_any_instance_of(Chef::Mixin::UserContext).to receive(:node).and_return({ "platform_family" => "windows" }) - allow(Chef::Platform).to receive(:windows_server_2003?).and_return(false) add_user = Mixlib::ShellOut.new("net user #{user} #{password} /ADD") add_user.run_command add_user.error! diff --git a/spec/functional/win32/versions_spec.rb b/spec/functional/win32/versions_spec.rb index d6e840ed7f..19bd0e3875 100644 --- a/spec/functional/win32/versions_spec.rb +++ b/spec/functional/win32/versions_spec.rb @@ -21,7 +21,7 @@ if Chef::Platform.windows? require "chef/win32/version" end -describe "Chef::ReservedNames::Win32::Version", :windows_only, :not_supported_on_win2k3 do +describe "Chef::ReservedNames::Win32::Version", :windows_only do before do wmi = WmiLite::Wmi.new @@ -31,14 +31,12 @@ describe "Chef::ReservedNames::Win32::Version", :windows_only, :not_supported_on # On Win2k8R2 and later, we can dynamically obtain marketing # names for comparison from WMI so the test should not # need to be modified when new Windows releases arise. - # For Win2k3 and Win2k8, we use static names in this test - # based on the version number information from WMI. The names - # from WMI contain extended characters such as registered - # trademark on Win2k8 and Win2k3 that we're not using in our - # library, so we have to set the expectation statically. - if Chef::Platform.windows_server_2003? - @current_os_version = "Windows Server 2003 R2" - elsif is_windows_server_2008?(host) + # For Win2k8 we use static names in this test based on the + # version number information from WMI. The names from WMI + # contain extended characters such as registered trademark + # on Win2k8 that we're not using in our library, so we have + # to set the expectation statically. + if is_windows_server_2008?(host) @current_os_version = "Windows Server 2008" else # The name from WMI is actually what we want in Win2k8R2+. |