mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 14:17:22 +00:00
* [Windows] Add WIX binaries folder to the PATH * Add Update-Environment, small prettifying * Move tests from script to Pester * Fix Wix tests to use Join-Path --------- Co-authored-by: Leon Zandman <lzandman@github.com>
25 lines
812 B
PowerShell
25 lines
812 B
PowerShell
Describe "Wix" {
|
|
BeforeAll {
|
|
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
|
$installedApplications = Get-ItemProperty -Path $regKey
|
|
$version = ($installedApplications | Where-Object { $_.BundleCachePath -imatch ".*\\WiX\d*\.exe$" } | Select-Object -First 1).DisplayName
|
|
}
|
|
|
|
It "Wix Toolset version from registry" {
|
|
$version | Should -Not -BeNullOrEmpty
|
|
}
|
|
|
|
It "Wix variable exists" {
|
|
$env:WIX | Should -Not -BeNullOrEmpty
|
|
}
|
|
|
|
It "Wix binaries folder exists" {
|
|
Test-Path -Path $(Join-Path -Path $env:WIX -ChildPath "bin") | Should -Be $true
|
|
}
|
|
|
|
It "Wix binaries folder is in PATH" {
|
|
$testPath = Join-Path -Path $env:WIX -ChildPath "bin"
|
|
$env:PATH -split ";" | Should -Contain "$testPath"
|
|
}
|
|
}
|