summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-03-28 16:59:19 -0700
committerSerdar Sutay <serdar@opscode.com>2014-03-28 16:59:19 -0700
commit852cadd9040c71759bbeb55311ebc7a8cff27150 (patch)
treeabbb4b35052e5b1ccab37339aaec099763aae5e6
parent123dac7da6710e53c6ad55f44cdd7eea2d2dc2bc (diff)
parent4279951b32148646595def30e0fecee54a5a4eda (diff)
downloadchef-852cadd9040c71759bbeb55311ebc7a8cff27150.tar.gz
Merge pull request #1348 from opscode/win-ci-fixes
Fix Windows 2003 CI issues
-rw-r--r--lib/chef/platform/query_helpers.rb4
-rw-r--r--spec/functional/win32/versions_spec.rb6
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/chef/platform/query_helpers.rb b/lib/chef/platform/query_helpers.rb
index 52d6649890..f9f7af0343 100644
--- a/lib/chef/platform/query_helpers.rb
+++ b/lib/chef/platform/query_helpers.rb
@@ -38,9 +38,11 @@ class Chef
WIN32OLE.ole_initialize
host = WMI::Win32_OperatingSystem.find(:first)
- (host.version && host.version.start_with?("5.2"))
+ is_server_2003 = (host.version && host.version.start_with?("5.2"))
WIN32OLE.ole_uninitialize
+
+ is_server_2003
end
end
diff --git a/spec/functional/win32/versions_spec.rb b/spec/functional/win32/versions_spec.rb
index 0b8a65114c..b983b711da 100644
--- a/spec/functional/win32/versions_spec.rb
+++ b/spec/functional/win32/versions_spec.rb
@@ -22,7 +22,7 @@ if Chef::Platform.windows?
require 'ruby-wmi'
end
-describe "Chef::ReservedNames::Win32::Version", :windows_only do
+describe "Chef::ReservedNames::Win32::Version", :windows_only, :not_supported_on_win2k3 do
before do
host = WMI::Win32_OperatingSystem.find(:first)
@@ -57,7 +57,7 @@ describe "Chef::ReservedNames::Win32::Version", :windows_only do
end
end
end
-
+
context "Win32 version object" do
it "should have have one method for each marketing version" do
versions = 0
@@ -88,7 +88,7 @@ describe "Chef::ReservedNames::Win32::Version", :windows_only do
for_each_windows_version { |method_name| @version.send(method_name.to_sym) }
end
end
-
+
context "Windows Operating System version" do
it "should match the version from WMI" do
@current_os_version.should include(@version.marketing_name)