Files
runner-images-sangeeth/images/win/scripts/Tests/Tools.Tests.ps1
Aleksandr Chebotov 0c4dca229d Replace current validates with pester testing approach #5 (#1232)
* ,oving to the pester approach part #5

* moving to the pester approach part #5

* fixed PostgreSQL tests

* return Validate-Svn.ps1

* fixed Selenium test

* fixed rust test

* fix rust test
2020-07-20 18:57:00 +03:00

158 lines
3.0 KiB
PowerShell

Import-Module (Join-Path $PSScriptRoot "..\SoftwareReport\SoftwareReport.Common.psm1") -DisableNameChecking
Describe "7-Zip" {
It "7z" {
"7z" | Should -ReturnZeroExitCode
}
}
Describe "CMake" {
It "cmake" {
"cmake --version" | Should -ReturnZeroExitCode
}
}
Describe "Kind" {
It "Kind" {
"kind version" | Should -ReturnZeroExitCode
}
}
Describe "DotnetTLS" {
It "Tls 1.2 is enabled" {
[Net.ServicePointManager]::SecurityProtocol -band "Tls12" | Should -Be Tls12
}
}
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
}
}
Describe "KubernetesCli" {
It "kubectl" {
"kubectl version --client=true --short=true" | Should -ReturnZeroExitCode
}
It "minikube" {
"minikube version --short" | Should -ReturnZeroExitCode
}
}
Describe "Mingw64" {
It "<ToolName>" -TestCases @(
@{ ToolName = "gcc" }
@{ ToolName = "g++" }
@{ ToolName = "make" }
) {
"$ToolName --version" | Should -ReturnZeroExitCode
}
}
Describe "InnoSetup" {
It "InnoSetup" {
(Get-Command -Name iscc).CommandType | Should -BeExactly "Application"
}
}
Describe "GitHub-CLI" {
It "gh" {
"gh --version" | Should -ReturnZeroExitCode
}
}
Describe "CloudFoundryCli" {
It "cf is located in C:\cf-cli" {
"C:\cf-cli\cf.exe" | Should -Exist
}
It "cf" {
"cf --version" | Should -ReturnZeroExitCode
}
}
Describe "GoogleCouldSDK" {
It "<ToolName>" -TestCases @(
@{ ToolName = "bq" }
@{ ToolName = "gcloud" }
@{ ToolName = "gsutil" }
) {
"$ToolName version" | Should -ReturnZeroExitCode
}
}
Describe "NET48" {
It "NET48" {
$netPath = (Get-DotnetFrameworkTools).Path.Split("<")[0]
${netPath} + "4.8 Tools" | Should -Exist
}
}
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
}
}
Describe "PowerShell Core" {
It "pwsh" {
"pwsh --version" | Should -ReturnZeroExitCode
}
It "Execute 2+2 command" {
pwsh -Command "2+2" | Should -BeExactly 4
}
}
Describe "Sbt" {
It "sbt" {
"sbt --version" | Should -ReturnZeroExitCode
}
}
Describe "ServiceFabricSDK" {
It "PowerShell Module" {
Get-Module -Name ServiceFabric -ListAvailable | Should -Not -BeNullOrEmpty
}
}