diff options
author | sersut <serdar@opscode.com> | 2012-12-04 15:11:42 -0800 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2012-12-25 08:52:38 -0800 |
commit | fb7e3f79ca1e95edcfb20353a385cac4a1c3c229 (patch) | |
tree | 1afa3d19c3ea0f30b6ec413f75ce30afb2bc0100 | |
parent | c739928ed93bde5572e7843dbbe8ff2e62f72766 (diff) | |
download | chef-fb7e3f79ca1e95edcfb20353a385cac4a1c3c229.tar.gz |
Disable link tests on Windows Server 2003 since symlink is not yet supported on this platform.
-rw-r--r-- | chef/spec/functional/resource/link_spec.rb | 2 | ||||
-rw-r--r-- | chef/spec/spec_helper.rb | 1 | ||||
-rw-r--r-- | chef/spec/support/platform_helpers.rb | 8 |
3 files changed, 10 insertions, 1 deletions
diff --git a/chef/spec/functional/resource/link_spec.rb b/chef/spec/functional/resource/link_spec.rb index b80dc72d49..39be3d58d9 100644 --- a/chef/spec/functional/resource/link_spec.rb +++ b/chef/spec/functional/resource/link_spec.rb @@ -22,7 +22,7 @@ if windows? require 'chef/win32/file' #probably need this in spec_helper end -describe Chef::Resource::Link do +describe Chef::Resource::Link, :not_supported_on_win2k3 do let(:file_base) { "file_spec" } let(:base_dir) do diff --git a/chef/spec/spec_helper.rb b/chef/spec/spec_helper.rb index 3611297aa6..8b69439bee 100644 --- a/chef/spec/spec_helper.rb +++ b/chef/spec/spec_helper.rb @@ -66,6 +66,7 @@ RSpec.configure do |config| # Add jruby filters here config.filter_run_excluding :windows_only => true unless windows? + config.filter_run_excluding :not_supported_on_win2k3 => true if windows_win2k3? config.filter_run_excluding :unix_only => true unless unix? config.filter_run_excluding :ruby_18_only => true unless ruby_18? config.filter_run_excluding :ruby_19_only => true unless ruby_19? diff --git a/chef/spec/support/platform_helpers.rb b/chef/spec/support/platform_helpers.rb index 558817d72a..fcb825319c 100644 --- a/chef/spec/support/platform_helpers.rb +++ b/chef/spec/support/platform_helpers.rb @@ -10,6 +10,14 @@ def windows? !!(RUBY_PLATFORM =~ /mswin|mingw|windows/) end +def windows_win2k3? + return false unless windows? + require 'ruby-wmi' + + host = WMI::Win32_OperatingSystem.find(:first) + (host.version && host.version.start_with?("5.2")) +end + # def jruby? def unix? |