Files
runner-images-sangeeth/images/win/scripts/Tests/Git.Tests.ps1
2020-09-22 16:18:15 +03:00

31 lines
895 B
PowerShell

Describe "Git" {
$gitTools = '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
}
}
Describe "GitVersion" {
It "gitversion is installed" {
"gitversion /version" | Should -ReturnZeroExitCode
}
}