Skip to content

Commit c375743

Browse files
committed
proper test
1 parent 058f2b2 commit c375743

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/agent.Tests.ps1

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,10 @@ Describe "[$global:IMAGE_NAME] image has correct applications in the PATH" {
8888
$stdout.Trim() | Should -Match "git-lfs/${global:GITLFSVERSION}"
8989
}
9090

91-
It 'can use git in a long path' {
92-
# docker run --detach --name "$global:CONTAINERNAME" "$global:IMAGE_NAME" "$global:CONTAINERSHELL"
93-
# Is-ContainerRunning $global:CONTAINERNAME | Should -BeTrue
94-
$longPath = 'C:\source\temp\' + ('a' * 200) + '\repo'
95-
# TODO: restore line above and remove line below
96-
# $longPath = 'C:\source\temp\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\heldesk'
91+
It 'can use git with a long path' {
92+
$longPath = 'C:\source\temp\' + ('a' * 260) + '\repo'
9793
$repository = 'https://github.com/jenkinsci/pipeline-model-definition-plugin.git'
98-
$exitCode, $stdout, $stderr = Run-Program 'docker' "exec $global:CONTAINERNAME $global:CONTAINERSHELL -C `"git version ; reg.exe query HKLM\SYSTEM\CurrentControlSet\Control\FileSystem ; cat .\.gitconfig ; New-Item -ItemType Directory -Path ${longPath} ; cd ${longPath} ; git init ; git remote add origin $repository ; git fetch origin ; git checkout master`""
94+
$exitCode, $stdout, $stderr = Run-Program 'docker' "exec $global:CONTAINERNAME $global:CONTAINERSHELL -C `"New-Item -ItemType Directory -Path ${longPath} ; cd ${longPath} ; git init ; git remote add origin $repository ; git fetch origin ; git checkout master`""
9995
$exitCode | Should -Be 0
10096
}
10197

0 commit comments

Comments
 (0)