Make sure to test whether we skip a test using consistent logic (#11892)

This commit is contained in:
James Truher [MSFT] 2020-02-19 14:20:35 -08:00 committed by GitHub
parent ac55229644
commit 349783fe36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,8 +44,12 @@ Describe "Basic Auth over HTTP not allowed on Unix" -Tag @("CI") {
It "New-PSSession should NOT throw a ConnectFailed exception when specifying Basic Auth over HTTPS on Unix" -skip:($IsWindows) {
$platformInfo = Get-PlatformInfo
if (($platformInfo -eq "alpine") -or ($platformInfo -eq "raspbian") ) {
Set-ItResult -Skipped -Because "MI library not available for Alpine or Raspberry Pi"
if (
($platformInfo.Platform -match "alpine|raspbian") -or
($platformInfo.Platform -eq "debian" -and ($platformInfo.Version -eq '10' -or $platformInfo.Version -eq '')) -or # debian 11 has empty Version ID
($platformInfo.Platform -eq 'centos' -and $platformInfo.Version -eq '8')
) {
Set-ItResult -Skipped -Because "MI library not available for Alpine, Raspberry Pi, Debian 10 and 11, and CentOS 8"
return
}