Files
runner-images-sangeeth/images/win/scripts/Tests/Git.Tests.ps1
Nikita Bykov 8a77fdb2a1 [Windows] Move choco installation list into toolset (#3688)
* Move choco installation list into toolset

* Add a condition to Install-CommonUtils.ps1

* Rename tests and revert Bazel to single script

* Return Install-Bazel.ps1 to windows2016.json and windows2019.json

* Remove condition and Write-Host command from Install-CommonUtils.ps1

* Reset Install-Bazel.ps1 to be the same as in main

* Update choco.common_packages in toolset-2016.json and toolset-2019.json

Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
2021-07-08 16:23:07 +03:00

26 lines
779 B
PowerShell

Describe "Git" {
$gitTools = 'bash', 'awk', 'git', 'git-lfs'
$gitTestCases = $gitTools | ForEach-Object {
@{
toolName = $_
source = [regex]::Escape("$env:ProgramFiles\Git")
}
}
It "<toolName> is installed" -TestCases $gitTestCases {
"$toolName --version" | Should -ReturnZeroExitCode
}
It "<toolName> is located in '<source>'" -TestCases $gitTestCases {
(Get-Command -Name $toolName).Source | Should -Match $source
}
It "Git core.symlinks=true option is enabled" {
git config core.symlinks | Should -BeExactly true
}
It "GCM_INTERACTIVE environment variable should be equal Never" {
$env:GCM_INTERACTIVE | Should -BeExactly Never
}
}