[DRE-commits] [chef] 11/13: Create patch to skip Windows stuff in tests
Lucas Kanashiro
kanashiro.duarte at gmail.com
Wed May 4 15:54:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
kanashiro-guest pushed a commit to branch master
in repository chef.
commit 3d45a466ca5774ad48df411b33722d9c32f5294a
Author: Lucas Kanashiro <kanashiro.duarte at gmail.com>
Date: Wed May 4 10:52:58 2016 -0300
Create patch to skip Windows stuff in tests
---
debian/changelog | 1 +
.../0002-remove-windows-dependency-in-tests.patch | 58 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 60 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 4070e80..eaf3fb9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ chef (12.7.2-1) UNRELEASED; urgency=medium
* Declare compliance with Debian policy 3.9.7
* Create debian/ruby-tests.rake to run tests during the build
* debian/control: add ruby-cheffish as new build dependency
+ * Create patch to skip Windows stuff in tests
-- Lucas Kanashiro <kanashiro.duarte at gmail.com> Thu, 03 Mar 2016 15:18:38 -0300
diff --git a/debian/patches/0002-remove-windows-dependency-in-tests.patch b/debian/patches/0002-remove-windows-dependency-in-tests.patch
new file mode 100644
index 0000000..044e33c
--- /dev/null
+++ b/debian/patches/0002-remove-windows-dependency-in-tests.patch
@@ -0,0 +1,58 @@
+--- a/spec/functional/win32/version_info_spec.rb
++++ b/spec/functional/win32/version_info_spec.rb
+@@ -22,29 +22,31 @@ if Chef::Platform.windows?
+ end
+
+ describe "Chef::ReservedNames::Win32::File::VersionInfo", :windows_only do
+- require "wmi-lite/wmi"
+- let(:file_path) { ENV["ComSpec"] }
+- let(:os_version) do
+- wmi = WmiLite::Wmi.new
+- os_info = wmi.first_of("Win32_OperatingSystem")
+- os_info["version"]
+- end
+-
+- subject { Chef::ReservedNames::Win32::File::VersionInfo.new(file_path) }
+-
+- it "file version has the same version as windows" do
+- expect(subject.FileVersion).to start_with(os_version)
+- end
+-
+- it "product version has the same version as windows" do
+- expect(subject.ProductVersion).to start_with(os_version)
+- end
+-
+- it "company is microsoft" do
+- expect(subject.CompanyName).to eq("Microsoft Corporation")
+- end
+-
+- it "file description is command processor" do
+- expect(subject.FileDescription).to eq("Windows Command Processor")
++ skip "is skipped because of Windows dependencies" do
++ require "wmi-lite/wmi"
++ let(:file_path) { ENV["ComSpec"] }
++ let(:os_version) do
++ wmi = WmiLite::Wmi.new
++ os_info = wmi.first_of("Win32_OperatingSystem")
++ os_info["version"]
++ end
++
++ subject { Chef::ReservedNames::Win32::File::VersionInfo.new(file_path) }
++
++ it "file version has the same version as windows" do
++ expect(subject.FileVersion).to start_with(os_version)
++ end
++
++ it "product version has the same version as windows" do
++ expect(subject.ProductVersion).to start_with(os_version)
++ end
++
++ it "company is microsoft" do
++ expect(subject.CompanyName).to eq("Microsoft Corporation")
++ end
++
++ it "file description is command processor" do
++ expect(subject.FileDescription).to eq("Windows Command Processor")
++ end
+ end
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 86136dd..23f80a9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+0002-remove-windows-dependency-in-tests.patch
0001-gemspec-update.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/chef.git
More information about the Pkg-ruby-extras-commits
mailing list