From dad5e0ecf89447cf4652a750699b056cac0a3617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rastislav=20Novotn=C3=BD?= Date: Fri, 21 Apr 2017 01:07:28 +0200 Subject: [PATCH 1/6] Verify InstalledOn date in correct culture in MSFT_MsiPackage unit test of Get-ProductEntryInfo function --- DscResources/MSFT_MsiPackage/MSFT_MsiPackage.psm1 | 2 +- Tests/Unit/MSFT_MsiPackage.Tests.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DscResources/MSFT_MsiPackage/MSFT_MsiPackage.psm1 b/DscResources/MSFT_MsiPackage/MSFT_MsiPackage.psm1 index 446e38a..b7743ba 100644 --- a/DscResources/MSFT_MsiPackage/MSFT_MsiPackage.psm1 +++ b/DscResources/MSFT_MsiPackage/MSFT_MsiPackage.psm1 @@ -626,7 +626,7 @@ function Get-ProductEntryInfo { try { - $installDate = '{0:d}' -f [DateTime]::ParseExact($installDate, 'yyyyMMdd',[System.Globalization.CultureInfo]::CurrentCulture).Date + $installDate = '{0:d}' -f [DateTime]::ParseExact($installDate, 'yyyyMMdd',[System.Globalization.CultureInfo]::InvariantCulture).Date } catch { diff --git a/Tests/Unit/MSFT_MsiPackage.Tests.ps1 b/Tests/Unit/MSFT_MsiPackage.Tests.ps1 index 9101cb0..8516b3c 100644 --- a/Tests/Unit/MSFT_MsiPackage.Tests.ps1 +++ b/Tests/Unit/MSFT_MsiPackage.Tests.ps1 @@ -57,7 +57,7 @@ Describe 'MsiPackage Unit Tests' { $script:mockProductEntryInfo = @{ Name = 'TestDisplayName' InstallSource = 'TestInstallSource' - InstalledOn = '4/4/2017' + InstalledOn = ([DateTime]::new(2017, 4, 24).ToShortDateString()) Size = 2048 Version = '1.2.3.4' PackageDescription = 'Test Description' @@ -586,7 +586,7 @@ Describe 'MsiPackage Unit Tests' { } Describe 'Get-ProductEntryInfo' { - Mock -CommandName Get-ProductEntryValue -MockWith { return '20170404' } -ParameterFilter { $Property -eq 'InstallDate' } + Mock -CommandName Get-ProductEntryValue -MockWith { return '20170424' } -ParameterFilter { $Property -eq 'InstallDate' } Mock -CommandName Get-ProductEntryValue -MockWith { return $script:mockProductEntryInfo.Publisher } -ParameterFilter { $Property -eq 'Publisher' } Mock -CommandName Get-ProductEntryValue -MockWith { return $script:mockProductEntryInfo.Size } -ParameterFilter { $Property -eq 'EstimatedSize' } Mock -CommandName Get-ProductEntryValue -MockWith { return $script:mockProductEntryInfo.Version } -ParameterFilter { $Property -eq 'DisplayVersion' } From 63a439723c86df20bbadb156498f1ec2f78b5b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rastislav=20Novotn=C3=BD?= Date: Fri, 21 Apr 2017 22:35:24 +0200 Subject: [PATCH 2/6] Add description of changes to MsiPackage resource into README file --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index eefeaea..4bfadff 100644 --- a/README.md +++ b/README.md @@ -582,6 +582,8 @@ The following parameters will be the same for each process in the set: * Archive: * Fixed a minor bug in the unit tests where sometimes the incorrect DateTime format was used. * Added MsiPackage + * Parse installation date from registry using invariant culture. + * Fix a bug in unit test failing, when regional setting differs from English-US. ### 2.5.0.0 From 5f39100a5b66be37d8e57d22350c010ca64d997e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rastislav=20Novotn=C3=BD?= Date: Sat, 22 Apr 2017 10:02:15 +0200 Subject: [PATCH 3/6] Move MsiPackage description to Unreleased section --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4bfadff..b0056ed 100644 --- a/README.md +++ b/README.md @@ -577,13 +577,15 @@ The following parameters will be the same for each process in the set: ### Unreleased +* MsiPackage + * Parse installation date from registry using invariant culture. + * Fix a bug in unit test failing, when regional setting differs from English-US. + ### 2.6.0.0 * Archive: * Fixed a minor bug in the unit tests where sometimes the incorrect DateTime format was used. * Added MsiPackage - * Parse installation date from registry using invariant culture. - * Fix a bug in unit test failing, when regional setting differs from English-US. ### 2.5.0.0 From eaad7b65e55e76b3ebc7fca4babaee969265bef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rastislav=20Novotn=C3=BD?= Date: Mon, 24 Apr 2017 19:35:08 +0200 Subject: [PATCH 4/6] Change tabs to spaces in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b0056ed..e414f8c 100644 --- a/README.md +++ b/README.md @@ -578,8 +578,8 @@ The following parameters will be the same for each process in the set: ### Unreleased * MsiPackage - * Parse installation date from registry using invariant culture. - * Fix a bug in unit test failing, when regional setting differs from English-US. + * Parse installation date from registry using invariant culture. + * Fix a bug in unit test failing, when regional setting differs from English-US. ### 2.6.0.0 From c0f119f53e4a6e02a7fe84a6762d55e1e8851615 Mon Sep 17 00:00:00 2001 From: Katie Keim Date: Wed, 31 May 2017 14:50:39 -0700 Subject: [PATCH 5/6] Releasing version 2.7.0.0 --- PSDscResources.psd1 | 9 +++++---- README.md | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/PSDscResources.psd1 b/PSDscResources.psd1 index 33e350c..f426912 100644 --- a/PSDscResources.psd1 +++ b/PSDscResources.psd1 @@ -4,7 +4,7 @@ # RootModule = '' # Version number of this module. -ModuleVersion = '2.6.0.0' +ModuleVersion = '2.7.0.0' # Supported PSEditions # CompatiblePSEditions = @() @@ -101,9 +101,9 @@ PrivateData = @{ # IconUri = '' # ReleaseNotes of this module - ReleaseNotes = '* Archive: - * Fixed a minor bug in the unit tests where sometimes the incorrect DateTime format was used. -* Added MsiPackage + ReleaseNotes = '* MsiPackage + * Parse installation date from registry using invariant culture. + * Fix a bug in unit test failing, when regional setting differs from English-US. ' @@ -124,3 +124,4 @@ PrivateData = @{ + diff --git a/README.md b/README.md index e414f8c..15d73fe 100644 --- a/README.md +++ b/README.md @@ -577,6 +577,8 @@ The following parameters will be the same for each process in the set: ### Unreleased +### 2.7.0.0 + * MsiPackage * Parse installation date from registry using invariant culture. * Fix a bug in unit test failing, when regional setting differs from English-US. From 96e0c009940ba498b8eba0cce26c643f57908b82 Mon Sep 17 00:00:00 2001 From: Katie Keim Date: Fri, 2 Jun 2017 11:37:21 -0700 Subject: [PATCH 6/6] Use previous AppVeyor image to fix User tests --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 15cab34..aef9749 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,7 @@ # environment configuration # #---------------------------------# version: 2.4.{build}.0 +os: Previous Visual Studio 2015 install: - git clone https://github.com/PowerShell/DscResource.Tests - ps: Import-Module -Name .\Tests\TestHelpers\WMF5Dot1Installation.psm1 -Force