[Windows] Improve Pester tests coverage for MSYS2 (#3595)

* Add ShouldReturnZeroExitCodeWithParam function and a new set of tests for MSYS2 tools

* Change get-command -> Get-Command

* Remove elevated user, return original path after msys installation and tests, resolve nitpicks

* Add BeforeEach and AfterEach blocks
These blocks change the path before each test
and return the original path after each test

* Change get-command -> Get-Command
This commit is contained in:
Mikhail Timofeev
2021-06-21 14:09:51 +03:00
committed by GitHub
parent 4143d0cc7b
commit 1fb8c5d6a1
5 changed files with 106 additions and 17 deletions

View File

@@ -88,6 +88,7 @@ foreach ($arch in $archs)
pacman.exe -Q | grep ^${arch}-
}
$env:PATH = $origPath
Write-Host "`nMSYS2 installation completed"
Invoke-PesterTests -TestFile "MSYS2"