From f6171862893cb29ad2e0a4a8988b5d2426d10b6b Mon Sep 17 00:00:00 2001 From: iSazonov Date: Thu, 9 Feb 2017 16:49:59 +0300 Subject: [PATCH 1/2] Small typo in archive cmdlets tests --- .../Pester.Commands.Cmdlets.Archive.Tests.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 index 2615c0323de..a42abd9a17a 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 @@ -12,9 +12,8 @@ Describe "Test suite for Microsoft.PowerShell.Archive module" -Tags "CI" { } BeforeAll { # remove the archive module forcefully, to be sure we get the correct version - if ( Get-Module Microsoft.PowerShell.Archive. ) { - Remove-Module Microsoft.PowerShell.Archive -force - } + Remove-Module Microsoft.PowerShell.Archive -force + # Version comparisons should use a System.Version rather than SemanticVersion $PSVersion = $PSVersionTable.PSVersion -as [Version] # Write-Progress not supported yet on Core From f073628f966fcf6d50fbbac6e85525fd7a168880 Mon Sep 17 00:00:00 2001 From: iSazonov Date: Fri, 10 Feb 2017 06:11:02 +0300 Subject: [PATCH 2/2] Add -ErrorAction SilentlyContinue --- .../Pester.Commands.Cmdlets.Archive.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 index a42abd9a17a..6cb22c642be 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 @@ -12,7 +12,7 @@ Describe "Test suite for Microsoft.PowerShell.Archive module" -Tags "CI" { } BeforeAll { # remove the archive module forcefully, to be sure we get the correct version - Remove-Module Microsoft.PowerShell.Archive -force + Remove-Module Microsoft.PowerShell.Archive -Force -ErrorAction SilentlyContinue # Version comparisons should use a System.Version rather than SemanticVersion $PSVersion = $PSVersionTable.PSVersion -as [Version]