[Windows] Rename ToolCache path helpers (#8874)

This commit is contained in:
Vasilii Polikarpov
2023-11-23 11:59:08 +01:00
committed by GitHub
parent 1254bc94a5
commit 64d5d2c1f4
4 changed files with 52 additions and 24 deletions

View File

@@ -35,7 +35,7 @@ function Test-Binaries {
@{ Name = $Name; Version = $Version; Arch = $Arch; Binary = $_.Binary; Arguments = $_.Arguments }
}
It "<Binary> <Arguments>" -TestCases $testCases {
$binaryFullPath = Join-Path (Get-ToolsetToolFullPath -Name $Name -Version $Version -Arch $Arch) $Binary
$binaryFullPath = Join-Path (Get-TCToolVersionPath -Name $Name -Version $Version -Arch $Arch) $Binary
"$binaryFullPath $Arguments" | Should -ReturnZeroExitCode
}
}
@@ -56,7 +56,7 @@ function Test-DefaultVersion {
It "default version is located in tool-cache" -TestCases $testCase {
$binaryFullPath = Get-WhichTool $Binary
$toolcacheDirectory = Get-ToolcacheToolDirectory -ToolName $Name
$toolcacheDirectory = Get-TCToolPath -ToolName $Name
$binaryFullPath | Should -Match ([Regex]::Escape($toolcacheDirectory))
}
}
@@ -70,7 +70,7 @@ foreach ($tool in $tools) {
Context "$version" {
$toolInfo = @{ Name = $tool.name; Version = $version; Arch = $tool.arch }
It "tool-cache directory exists" -TestCases $toolInfo {
$toolFullPath = Get-ToolsetToolFullPath -Name $Name -Version $Version -Arch $Arch
$toolFullPath = Get-TCToolVersionPath -Name $Name -Version $Version -Arch $Arch
$toolFullPath | Should -Exist
}
@@ -86,4 +86,4 @@ foreach ($tool in $tools) {
}
}
}
}
}