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-02 10:57:50 -0700
commit076ad36dd1dd6b9b052a22f2b7db4e39c92461dd (patch)
tree3afea88dc06cf3e5350bb3c8dda1c553e819631d
parent4b728c6ec8ed4b4ab5ac4807de69f363566cb948 (diff)
downloadchef-076ad36dd1dd6b9b052a22f2b7db4e39c92461dd.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 988339fd7a..2c5cd63357 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