mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-17 23:36:44 +00:00
* ,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
27 lines
1.0 KiB
PowerShell
27 lines
1.0 KiB
PowerShell
Describe "Rust" {
|
|
$rustTools = @(
|
|
@{ToolName = "rustup"; binPath = "C:\Rust\.cargo\bin\rustup.exe"}
|
|
@{ToolName = "rustc"; binPath = "C:\Rust\.cargo\bin\rustc.exe"}
|
|
@{ToolName = "cargo"; binPath = "C:\Rust\.cargo\bin\cargo.exe"}
|
|
@{ToolName = "cargo audit"; binPath = "C:\Rust\.cargo\bin\cargo-audit.exe"}
|
|
@{ToolName = "cargo outdated"; binPath = "C:\Rust\.cargo\bin\cargo-outdated.exe"}
|
|
)
|
|
|
|
$rustEnvNotExists = @(
|
|
@{envVar = "RUSTUP_HOME"}
|
|
@{envVar = "CARGO_HOME"}
|
|
)
|
|
|
|
It "C:\Rust\.rustup and C:\Rust\.cargo folders exist" {
|
|
"C:\Rust\.rustup", "C:\Rust\.cargo" | Should -Exist
|
|
}
|
|
|
|
It "<envVar> environment variable does not exist" -TestCases $rustEnvNotExists {
|
|
[Environment]::GetEnvironmentVariables("Machine").ContainsKey($envVar) | Should -BeFalse
|
|
}
|
|
|
|
It "<ToolName> is installed to the '<binPath>' folder" -TestCases $rustTools {
|
|
"$ToolName --version" | Should -ReturnZeroExitCode
|
|
$binPath | Should -Exist
|
|
}
|
|
} |