summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@loftninjas.org>2020-03-31 22:17:09 -0400
committerTim Smith <tsmith84@gmail.com>2020-04-07 11:09:09 -0700
commit93ee2d39a7ab1f213ffbcc5996ba7abcfbe58606 (patch)
tree7e3bd803a0b7c016858a0b6beaf6edde4efca6e1
parenta24c03abc4c5906b65f26816e209427269ec3d19 (diff)
downloadchef-93ee2d39a7ab1f213ffbcc5996ba7abcfbe58606.tar.gz
Fix functional tests on Windows 10 by matching less
Windows 10 1909 is a service pack, but without being called a service pack. 1909 is a very small update over 1903, and in fact most of the binaries are not rebuilt. The version for 1909 is 10.0.18363, but the version in many files is still 10.0.18362, which was the version for 1903. This caused this functional test to fail on 1909 because 10.0.18362 != 10.0.18363. Nowhere else are we concerned with the file versions matching the OS version, so the fix is to match less of the version. By matching only '10.0', we should not see this again. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
-rw-r--r--spec/functional/win32/version_info_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/functional/win32/version_info_spec.rb b/spec/functional/win32/version_info_spec.rb
index b5570732a0..f401d5ecfa 100644
--- a/spec/functional/win32/version_info_spec.rb
+++ b/spec/functional/win32/version_info_spec.rb
@@ -32,12 +32,12 @@ describe "Chef::ReservedNames::Win32::File::VersionInfo", :windows_only do
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)
+ it "file version has the same major.minor version as windows" do
+ expect(subject.FileVersion).to start_with(os_version.rpartition(".").first)
end
- it "product version has the same version as windows" do
- expect(subject.ProductVersion).to start_with(os_version)
+ it "product version has the same major.minor version as windows" do
+ expect(subject.ProductVersion).to start_with(os_version.rpartition(".").first)
end
it "company is microsoft" do