mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +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
This commit is contained in:
committed by
GitHub
parent
956b8a0093
commit
0c4dca229d
27
images/win/scripts/Tests/Rust.Tests.ps1
Normal file
27
images/win/scripts/Tests/Rust.Tests.ps1
Normal file
@@ -0,0 +1,27 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user