2020-07-17 15:29:03 +07:00
Import-Module ( Join-Path $PSScriptRoot "..\SoftwareReport\SoftwareReport.Common.psm1" ) -DisableNameChecking
2020-07-09 10:53:29 +03:00
Describe "7-Zip" {
It "7z" {
"7z" | Should -ReturnZeroExitCode
}
}
2020-07-21 09:50:01 +03:00
Describe "AzCopy" {
It "AzCopy" {
"azcopy --version" | Should -ReturnZeroExitCode
}
}
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
}
}
2020-07-09 10:53:29 +03:00
Describe "CMake" {
It "cmake" {
"cmake --version" | Should -ReturnZeroExitCode
}
}
2020-09-09 15:50:49 +01:00
Describe "CodeQLBundle" {
It "CodeQLBundle" {
2020-09-15 13:54:28 +01:00
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "codeql" | Join-Path -ChildPath "*"
2020-09-17 09:57:18 +01:00
$CodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Select-Object -First 1 -Expand FullName
2020-09-16 14:11:22 +01:00
$CodeQLPath = Join-Path $CodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql.exe"
2020-09-09 15:50:49 +01:00
" $CodeQLPath version" | Should -ReturnZeroExitCode
}
}
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" {
( Get-ItemProperty HKLM : \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall \*). DisplayName -Contains "Microsoft SQL Server Data-Tier Application Framework (x64)" | Should -BeTrue
$sqlPackagePath = 'C:\Program Files\Microsoft SQL Server\150\DAC\bin\SqlPackage.exe'
$sqlLocalDBPath = 'C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe'
" ${sqlPackagePath} " | Should -Exist
" ${sqlLocalDBPath} " | Should -Exist
}
2020-07-13 16:17:49 +03:00
}
Describe "DotnetTLS" {
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 "Jq" {
It "Jq" {
"jq -n ." | Should -ReturnZeroExitCode
}
}
Describe "Julia" {
It "Julia path exists" {
"C:\Julia" | Should -Exist
}
It "Julia" {
"julia --version" | Should -ReturnZeroExitCode
}
}
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
}
}
Describe "InnoSetup" {
It "InnoSetup" {
( Get-Command -Name iscc ). CommandType | Should -BeExactly "Application"
}
}
2020-08-27 11:34:37 -04:00
Describe "GoogleCloudSDK" {
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" {
$netPath = ( Get-DotnetFrameworkTools ). Path . Split ( "<" )[ 0 ]
${ netPath } + "4.8 Tools" | Should -Exist
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 "NSIS" {
It "NSIS" {
"makensis /VERSION" | Should -ReturnZeroExitCode
}
}
Describe "Nuget" {
It "Nuget" {
"nuget" | Should -ReturnZeroExitCode
}
}
Describe "OpenSSL" {
It "OpenSSL" {
"openssl version" | Should -ReturnZeroExitCode
}
}
Describe "Packer" {
It "Packer" {
"packer --version" | Should -ReturnZeroExitCode
}
}
Describe "Perl" {
It "Perl" {
"perl --version" | Should -ReturnZeroExitCode
2020-07-10 14:29:54 +03:00
}
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
}
}
2020-08-28 10:34:51 +03:00
Describe "Pulumi" {
It "pulumi" {
"pulumi version" | Should -ReturnZeroExitCode
}
}
2020-07-20 18:57:00 +03:00
Describe "Sbt" {
It "sbt" {
"sbt --version" | Should -ReturnZeroExitCode
}
}
Describe "ServiceFabricSDK" {
It "PowerShell Module" {
Get-Module -Name ServiceFabric -ListAvailable | Should -Not -BeNullOrEmpty
}
2020-07-30 12:12:49 +05:00
}
Describe "Svn" {
It "svn" {
"svn --version --quiet" | Should -ReturnZeroExitCode
}
}
Describe "Stack" {
It "Stack" {
"stack --version" | Should -ReturnZeroExitCode
}
}
Describe "Typescript" {
It "tsc" {
"tsc --version" | Should -ReturnZeroExitCode
}
}
Describe "Vcpkg" {
It "vcpkg" {
"vcpkg version" | Should -ReturnZeroExitCode
}
It "env variable VCPKG_INSTALLATION_ROOT is set" {
$env:VCPKG_INSTALLATION_ROOT | Should -Not -BeNullOrEmpty
}
It "VCPKG_INSTALLATION_ROOT directory" {
$env:VCPKG_INSTALLATION_ROOT | Should -Exist
}
}
Describe "VSWhere" {
It "vswhere" {
"vswhere" | Should -ReturnZeroExitCode
}
}
2020-08-08 08:01:33 +03:00
Describe "WebPlatformInstaller" {
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
}
}