Pin major Pester version to 4 to prevent breaking changes caused by upcoming release of v5 (#12262)

This commit is contained in:
Christoph Bergmeister [MVP] 2020-04-14 07:21:19 +01:00 committed by GitHub
parent 14487bf85d
commit a29cffd49d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View file

@ -34,7 +34,7 @@ jobs:
condition: succeededOrFailed()
- powershell: |
Install-module pester -Scope CurrentUser -Force
Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99
displayName: Install Pester
condition: succeededOrFailed()

View file

@ -34,7 +34,7 @@ jobs:
continueOnError: true
- pwsh: |
Install-module pester -Scope CurrentUser -Force
Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99
displayName: 'Install Pester'
continueOnError: true

View file

@ -689,7 +689,7 @@ function Restore-PSPester
[ValidateNotNullOrEmpty()]
[string] $Destination = ([IO.Path]::Combine((Split-Path (Get-PSOptions -DefaultToNew).Output), "Modules"))
)
Save-Module -Name Pester -Path $Destination -Repository PSGallery -RequiredVersion "4.8.0"
Save-Module -Name Pester -Path $Destination -Repository PSGallery -MaximumVersion 4.99
}
function Compress-TestContent {

View file

@ -492,8 +492,9 @@ function Invoke-CIFinish
$env:PSMsiX64Path = $artifacts | Where-Object { $_.EndsWith(".msi")}
# Install the latest Pester and import it
Install-Module Pester -Force -SkipPublisherCheck
Import-Module Pester -Force
$maximumPesterVersion = '4.99'
Install-Module Pester -Force -SkipPublisherCheck -MaximumVersion $maximumPesterVersion
Import-Module Pester -Force -MaximumVersion $maximumPesterVersion
# start the packaging tests and get the results
$packagingTestResult = Invoke-Pester -Script (Join-Path $repoRoot '.\test\packaging\windows\') -PassThru