2020-07-21 09:50:01 +03:00
Describe "Azure Cosmos DB Emulator" {
$cosmosDbEmulatorRegKey = Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" | Get-ItemProperty | Where-Object { $_ . DisplayName -eq 'Azure Cosmos DB Emulator' }
$installDir = $cosmosDbEmulatorRegKey . InstallLocation
It "Azure Cosmos DB Emulator install location registry key exists" -TestCases @ { installDir = $installDir } {
$installDir | Should -Not -BeNullOrEmpty
}
It "Azure Cosmos DB Emulator exe file exists" -TestCases @ { installDir = $installDir } {
$exeFilePath = Join-Path $installDir 'CosmosDB.Emulator.exe'
$exeFilePath | Should -Exist
}
}
Describe "Bazel" {
It "<ToolName>" -TestCases @ (
@ { ToolName = "bazel" }
@ { ToolName = "bazelisk" }
) {
" $ToolName --version" | Should -ReturnZeroExitCode
}
}
2023-01-29 05:46:43 -08:00
Describe "CodeQLBundles" {
It "Latest CodeQL Bundle" {
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"
$LatestCodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Sort-Object -Descending | Select-Object -First 1 -Expand FullName
$LatestCodeQLPath = Join-Path $LatestCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql.exe"
" $LatestCodeQLPath version --quiet" | Should -ReturnZeroExitCode
$LatestCodeQLPacksPath = Join-Path $LatestCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "qlpacks"
$LatestCodeQLPacksPath | Should -Exist
2020-09-09 15:50:49 +01:00
}
2023-01-29 05:46:43 -08:00
It "Prior CodeQL Bundle" {
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"
$PriorCodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Sort-Object -Descending | Select-Object -Last 1 -Expand FullName
$PriorCodeQLPath = Join-Path $PriorCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql.exe"
" $PriorCodeQLPath version --quiet" | Should -ReturnZeroExitCode
$PriorCodeQLPacksPath = Join-Path $PriorCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "qlpacks"
$PriorCodeQLPacksPath | Should -Exist
}
It "Latest and Prior CodeQL Bundles are unique" {
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"
$LatestCodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Sort-Object -Descending | Select-Object -First 1 -Expand FullName
$LatestCodeQLPath = Join-Path $LatestCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql.exe"
$LatestCodeQLVersion = & $LatestCodeQLPath version - -quiet
$PriorCodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Sort-Object -Descending | Select-Object -Last 1 -Expand FullName
$PriorCodeQLPath = Join-Path $PriorCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql.exe"
$PriorCodeQLVersion = & $PriorCodeQLPath version - -quiet
$LatestCodeQLVersion | Should -Not -Match $PriorCodeQLVersion
}
2020-09-09 15:50:49 +01:00
}
2020-07-27 11:41:47 +03:00
Describe "R" {
It "Rscript" {
"Rscript --version" | Should -ReturnZeroExitCode
}
}
2020-07-21 09:50:01 +03:00
Describe "DACFx" {
It "DACFx" {
2022-05-26 11:53:27 +02:00
( Get-ItemProperty HKLM : \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall \*). DisplayName -Contains "Microsoft SQL Server Data-Tier Application Framework" | Should -BeTrue
2022-01-28 14:18:57 +03:00
$sqlPackagePath = 'C:\Program Files\Microsoft SQL Server\160\DAC\bin\SqlPackage.exe'
2020-07-21 09:50:01 +03:00
" ${sqlPackagePath} " | Should -Exist
2021-08-23 11:13:14 +03:00
}
It "SqlLocalDB" -Skip: ( Test-IsWin22 ) {
$sqlLocalDBPath = 'C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe'
2020-07-21 09:50:01 +03:00
" ${sqlLocalDBPath} " | Should -Exist
}
2020-07-13 16:17:49 +03:00
}
2021-08-23 11:13:14 +03:00
Describe "DotnetTLS" -Skip: ( Test-IsWin22 ) {
2020-07-13 16:17:49 +03:00
It "Tls 1.2 is enabled" {
2020-07-14 09:40:02 +03:00
[ Net.ServicePointManager ]:: SecurityProtocol -band "Tls12" | Should -Be Tls12
2020-07-13 16:17:49 +03:00
}
2020-07-15 08:26:27 +03:00
}
2020-07-10 14:29:54 +03:00
Describe "Mercurial" {
It "Mercurial" {
"hg --version" | Should -ReturnZeroExitCode
}
}
2021-01-29 11:38:57 +03:00
Describe "KubernetesTools" {
It "Kind" {
"kind version" | Should -ReturnZeroExitCode
}
2020-07-10 14:29:54 +03:00
It "kubectl" {
"kubectl version --client=true --short=true" | Should -ReturnZeroExitCode
}
2021-01-29 11:38:57 +03:00
It "Helm" {
"helm version --short" | Should -ReturnZeroExitCode
}
2020-07-10 14:29:54 +03:00
It "minikube" {
"minikube version --short" | Should -ReturnZeroExitCode
}
}
Describe "Mingw64" {
2020-07-17 15:29:03 +07:00
It "<ToolName>" -TestCases @ (
@ { ToolName = "gcc" }
@ { ToolName = "g++" }
@ { ToolName = "make" }
) {
" $ToolName --version" | Should -ReturnZeroExitCode
2020-07-10 14:29:54 +03:00
}
}
2021-08-23 11:13:14 +03:00
Describe "GoogleCloudSDK" -Skip: ( Test-IsWin22 ) {
2020-07-17 15:29:03 +07:00
It "<ToolName>" -TestCases @ (
@ { ToolName = "bq" }
@ { ToolName = "gcloud" }
@ { ToolName = "gsutil" }
) {
" $ToolName version" | Should -ReturnZeroExitCode
2020-07-10 14:29:54 +03:00
}
2020-07-17 15:29:03 +07:00
}
2020-07-10 14:29:54 +03:00
2020-07-17 15:29:03 +07:00
Describe "NET48" {
It "NET48" {
2022-12-14 19:53:32 +01:00
Get-ChildItem -Path "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\*\*\NETFX 4.8 Tools" -Directory | Should -HaveCount 1
2020-07-10 14:29:54 +03:00
}
2020-07-17 15:29:03 +07:00
}
2020-07-10 14:29:54 +03:00
2021-10-26 14:16:20 +03:00
Describe "NSIS" {
2020-07-17 15:29:03 +07:00
It "NSIS" {
"makensis /VERSION" | Should -ReturnZeroExitCode
}
}
2020-07-20 18:57:00 +03:00
Describe "PowerShell Core" {
It "pwsh" {
"pwsh --version" | Should -ReturnZeroExitCode
}
It "Execute 2+2 command" {
pwsh -Command "2+2" | Should -BeExactly 4
}
}
2021-11-22 13:21:03 +01:00
Describe "Sbt" {
2020-07-20 18:57:00 +03:00
It "sbt" {
"sbt --version" | Should -ReturnZeroExitCode
}
}
2021-12-27 23:12:44 +03:00
Describe "ServiceFabricSDK" {
2020-07-20 18:57:00 +03:00
It "PowerShell Module" {
Get-Module -Name ServiceFabric -ListAvailable | Should -Not -BeNullOrEmpty
}
2021-11-23 21:01:37 +03:00
It "ServiceFabricSDK version" {
Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Service Fabric\' -Name FabricVersion | Should -Not -BeNullOrEmpty
}
2020-07-30 12:12:49 +05:00
}
Describe "Stack" {
It "Stack" {
"stack --version" | Should -ReturnZeroExitCode
}
}
Describe "Vcpkg" {
It "vcpkg" {
2022-09-08 17:29:02 +02:00
"vcpkg version" | Should -ReturnZeroExitCode
2020-07-30 12:12:49 +05:00
}
It "env variable VCPKG_INSTALLATION_ROOT is set" {
2022-09-08 17:29:02 +02:00
$env:VCPKG_INSTALLATION_ROOT | Should -Not -BeNullOrEmpty
2020-07-30 12:12:49 +05:00
}
2022-10-24 12:23:14 +02:00
2022-10-25 09:30:50 +02:00
It "VCPKG_INSTALLATION_ROOT directory" {
$env:VCPKG_INSTALLATION_ROOT | Should -Exist
2020-07-30 12:12:49 +05:00
}
}
2021-09-29 09:40:01 +03:00
Describe "VCRedist" -Skip: ( Test-IsWin22 ) {
2022-08-01 15:35:36 +02:00
It "vcredist_2010_x64" {
2021-09-29 09:40:01 +03:00
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1D8E6291-B0D5-35EC-8441-6616F567A0F7}" | Should -Exist
"C:\Windows\System32\msvcr100.dll" | Should -Exist
}
}
2021-12-27 23:12:44 +03:00
Describe "WebPlatformInstaller" {
2020-08-08 08:01:33 +03:00
It "WebPlatformInstaller" {
"WebPICMD" | Should -ReturnZeroExitCode
}
}
2020-07-30 12:12:49 +05:00
Describe "Zstd" {
It "zstd" {
"zstd -V" | Should -ReturnZeroExitCode
}
}
2020-10-08 16:57:24 +03:00
Describe "Pipx" {
It "Pipx" {
"pipx --version" | Should -ReturnZeroExitCode
}
}
2021-09-16 11:35:11 +03:00
Describe "Kotlin" {
2022-12-29 20:39:24 +01:00
$kotlinPackages = @ ( "kapt" , "kotlin" , "kotlinc" , "kotlin-dce-js" , "kotlinc-jvm" )
2021-09-16 11:35:11 +03:00
2021-11-22 13:21:03 +01:00
It "<toolName> is available" -TestCases ( $kotlinPackages | ForEach-Object { @ { toolName = $_ } }) {
2021-09-16 11:35:11 +03:00
" $toolName -version" | Should -ReturnZeroExitCode
}
2021-11-22 13:21:03 +01:00
}
2022-01-20 15:59:37 +03:00
2022-08-01 15:35:36 +02:00
Describe "SQL OLEDB Driver" {
2022-01-20 15:59:37 +03:00
It "SQL OLEDB Driver" {
"HKLM:\SOFTWARE\Microsoft\MSOLEDBSQL" | Should -Exist
}
2022-08-11 16:45:40 +02:00
}
2023-03-28 10:42:14 +02:00
Describe "OpenSSL" {
It "OpenSSL" {
2023-03-31 16:30:04 +02:00
$OpenSSLVersion = ( Get-ToolsetContent ). openssl . version
openssl version | Should -BeLike "* ${OpenSSLVersion} *"
2023-03-28 10:42:14 +02:00
}
}