Skip to content

Commit eaeca63

Browse files
JamesWTruheradityapatwardhan
authored andcommitted
Run tests for Windows installer only on Windows (PowerShell#5619)
1 parent 3469d4b commit eaeca63

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/powershell/Installer/WindowsInstaller.Tests.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Describe "Windows Installer" -Tags "Scenario" {
22

33
BeforeAll {
4+
$skipTest = -not $IsWindows
45
$preRequisitesLink = 'https://aka.ms/pscore6-prereq'
56
$linkCheckTestCases = @(
67
@{ Name = "Universal C Runtime"; Url = $preRequisitesLink }
@@ -10,15 +11,15 @@ Describe "Windows Installer" -Tags "Scenario" {
1011
)
1112
}
1213

13-
It "WiX (Windows Installer XML) file contains pre-requisites link $preRequisitesLink" {
14+
It "WiX (Windows Installer XML) file contains pre-requisites link $preRequisitesLink" -skip:$skipTest {
1415
$wixProductFile = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\assets\Product.wxs"
1516
(Get-Content $wixProductFile -Raw).Contains($preRequisitesLink) | Should Be $true
1617
}
1718

1819
## Running 'Invoke-WebRequest' with WMF download URLs has been failing intermittently,
1920
## because sometimes the URLs lead to a 'this download is no longer available' page.
2021
## We use a retry logic here. Retry for 5 times with 1 second interval.
21-
It "Pre-Requisistes link for '<Name>' is reachable: <url>" -TestCases $linkCheckTestCases {
22+
It "Pre-Requisistes link for '<Name>' is reachable: <url>" -TestCases $linkCheckTestCases -skip:$skipTest {
2223
param ($Url)
2324

2425
foreach ($i in 1..5) {

0 commit comments

Comments
 (0)