Update ManifestConfig.Tests.ps1

This commit is contained in:
Alice King Tai Poon 2022-06-05 16:27:54 +08:00 committed by GitHub
parent 75de75d5da
commit 53c3715fac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,19 +4,17 @@ $ConfigurationFile = Join-Path $PSScriptRoot "../config/python-manifest-config.j
$Configuration = Read-ConfigurationFile -Filepath $ConfigurationFile
$stableTestCases = @(
@{ ReleaseName = "python-3.8.3-darwin-x64.tar.gz"; ExpectedResult = @{ platform = "darwin"; platform_version = $null; arch = "x64"} },
@{ ReleaseName = "python-3.8.3-linux-18.04-x64.tar.gz"; ExpectedResult = @{ platform = "linux"; platform_version = "18.04"; arch = "x64"} },
@{ ReleaseName = "python-3.8.3-linux-20.04-x64.tar.gz"; ExpectedResult = @{ platform = "linux"; platform_version = "20.04"; arch = "x64"} },
@{ ReleaseName = "python-3.8.3-win32-x64.zip"; ExpectedResult = @{ platform = "win32"; platform_version = $null; arch = "x64"} },
@{ ReleaseName = "python-3.8.3-win32-x86.zip"; ExpectedResult = @{ platform = "win32"; platform_version = $null; arch = "x86"} }
@{ ReleaseName = "python-3.10.4-darwin-x64.tar.gz"; ExpectedResult = @{ platform = "darwin"; platform_version = $null; arch = "x64"} },
@{ ReleaseName = "python-3.10.4-linux-18.04-x64.tar.gz"; ExpectedResult = @{ platform = "linux"; platform_version = "18.04"; arch = "x64"} },
@{ ReleaseName = "python-3.10.4-linux-20.04-x64.tar.gz"; ExpectedResult = @{ platform = "linux"; platform_version = "20.04"; arch = "x64"} },
@{ ReleaseName = "python-3.10.4-win32-x64.zip"; ExpectedResult = @{ platform = "win32"; platform_version = $null; arch = "x64"} }
) | ForEach-Object { $_.Configuration = $Configuration; $_ }
$unstableTestCases = @(
@{ ReleaseName = "python-3.9.0-alpha.2-darwin-x64.tar.gz"; ExpectedResult = @{ platform = "darwin"; platform_version = $null; arch = "x64"} },
@{ ReleaseName = "python-3.9.0-rc.4-linux-18.04-x64.tar.gz"; ExpectedResult = @{ platform = "linux"; platform_version = "18.04"; arch = "x64"} },
@{ ReleaseName = "python-3.9.0-beta.2-linux-20.04-x64.tar.gz"; ExpectedResult = @{ platform = "linux"; platform_version = "20.04"; arch = "x64"} },
@{ ReleaseName = "python-3.9.0-beta.2-win32-x64.zip"; ExpectedResult = @{ platform = "win32"; platform_version = $null; arch = "x64"} },
@{ ReleaseName = "python-3.9.0-beta.2-win32-x86.zip"; ExpectedResult = @{ platform = "win32"; platform_version = $null; arch = "x86"} }
@{ ReleaseName = "python-3.12.0-alpha.0-darwin-x64.tar.gz"; ExpectedResult = @{ platform = "darwin"; platform_version = $null; arch = "x64"} },
@{ ReleaseName = "python-3.10.0-rc.2-linux-18.04-x64.tar.gz"; ExpectedResult = @{ platform = "linux"; platform_version = "18.04"; arch = "x64"} },
@{ ReleaseName = "python-3.11.0-beta.3-linux-20.04-x64.tar.gz"; ExpectedResult = @{ platform = "linux"; platform_version = "20.04"; arch = "x64"} },
@{ ReleaseName = "python-3.11.0-beta.3-win32-x64.zip"; ExpectedResult = @{ platform = "win32"; platform_version = $null; arch = "x64"} }
) | ForEach-Object { $_.Configuration = $Configuration; $_ }
Describe "Python manifest config" {
@ -39,4 +37,4 @@ Describe "Python manifest config" {
$asset.arch | Should -Be $ExpectedResult.arch
}
}
}
}