Skip to content

Commit bef8603

Browse files
authored
Merge pull request #495 from lemeurherveCB/helpesk4557-disable-failing-test-for-now
chore: disable failing test(s) until jenkins-infra/helpdesk#4557 infra issue is resolved
2 parents b8fe707 + 29fba43 commit bef8603

File tree

1 file changed

+63
-60
lines changed

1 file changed

+63
-60
lines changed

tests/sshAgent.Tests.ps1

Lines changed: 63 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -131,66 +131,69 @@ Describe "[$global:IMAGE_NAME] image has correct version of java and git-lfs ins
131131
}
132132
}
133133

134-
Describe "[$global:IMAGE_NAME] create agent container with pubkey as argument" {
135-
BeforeAll {
136-
$exitCode, $stdout, $stderr = Run-Program 'docker' "run --detach --tty --name=`"$global:CONTAINERNAME`" --publish-all `"$global:IMAGE_NAME`" `"$global:PUBLIC_SSH_KEY`""
137-
$exitCode | Should -Be 0
138-
Is-ContainerRunning $global:CONTAINERNAME | Should -BeTrue
139-
Start-Sleep -Seconds 10
140-
}
141-
142-
It 'runs commands via ssh' {
143-
$exitCode, $stdout, $stderr = Run-ThruSSH $global:CONTAINERNAME "$global:PRIVATE_SSH_KEY" "$global:CONTAINERSHELL -NoLogo -C `"Write-Host 'f00'`""
144-
$exitCode | Should -Be 0
145-
$stdout | Should -Match 'f00'
146-
}
147-
148-
AfterAll {
149-
Cleanup($global:CONTAINERNAME)
150-
}
151-
}
152-
153-
Describe "[$global:IMAGE_NAME] create agent container with pubkey as envvar" {
154-
BeforeAll {
155-
$exitCode, $stdout, $stderr = Run-Program 'docker' "run --detach --tty --name=`"$global:CONTAINERNAME`" --publish-all `"$global:IMAGE_NAME`" `"$global:PUBLIC_SSH_KEY`""
156-
$exitCode | Should -Be 0
157-
Is-ContainerRunning $global:CONTAINERNAME | Should -BeTrue
158-
Start-Sleep -Seconds 10
159-
}
160-
161-
It 'runs commands via ssh' {
162-
$exitCode, $stdout, $stderr = Run-ThruSSH $global:CONTAINERNAME "$global:PRIVATE_SSH_KEY" "$global:CONTAINERSHELL -NoLogo -C `"Write-Host 'f00'`""
163-
$exitCode | Should -Be 0
164-
$stdout | Should -Match 'f00'
165-
Start-Sleep -Seconds 10
166-
}
167-
168-
AfterAll {
169-
Cleanup($global:CONTAINERNAME)
170-
}
171-
}
172-
173-
174-
$global:DOCKER_PLUGIN_DEFAULT_ARG="/usr/sbin/sshd -D -p 22"
175-
Describe "[$global:IMAGE_NAME] create agent container like docker-plugin with '$global:DOCKER_PLUGIN_DEFAULT_ARG' as argument" {
176-
BeforeAll {
177-
[string]::IsNullOrWhiteSpace($global:DOCKER_PLUGIN_DEFAULT_ARG) | Should -BeFalse
178-
$exitCode, $stdout, $stderr = Run-Program 'docker' "run --detach --tty --name=`"$global:CONTAINERNAME`" --publish-all --env=`"JENKINS_AGENT_SSH_PUBKEY=$global:PUBLIC_SSH_KEY`" `"$global:IMAGE_NAME`" `"$global:DOCKER_PLUGIN_DEFAULT_ARG`""
179-
$exitCode | Should -Be 0
180-
Is-ContainerRunning $global:CONTAINERNAME | Should -BeTrue
181-
Start-Sleep -Seconds 10
182-
}
183-
184-
It 'runs commands via ssh' {
185-
$exitCode, $stdout, $stderr = Run-ThruSSH $global:CONTAINERNAME "$global:PRIVATE_SSH_KEY" "$global:CONTAINERSHELL -NoLogo -C `"Write-Host 'f00'`""
186-
$exitCode | Should -Be 0
187-
$stdout | Should -Match 'f00'
188-
}
189-
190-
AfterAll {
191-
Cleanup($global:CONTAINERNAME)
192-
}
193-
}
134+
# TODO: restore when https://github.com/jenkins-infra/helpdesk/issues/4557 infra issue is resolved
135+
# Describe "[$global:IMAGE_NAME] create agent container with pubkey as argument" {
136+
# BeforeAll {
137+
# $exitCode, $stdout, $stderr = Run-Program 'docker' "run --detach --tty --name=`"$global:CONTAINERNAME`" --publish-all `"$global:IMAGE_NAME`" `"$global:PUBLIC_SSH_KEY`""
138+
# $exitCode | Should -Be 0
139+
# Is-ContainerRunning $global:CONTAINERNAME | Should -BeTrue
140+
# Start-Sleep -Seconds 10
141+
# }
142+
143+
# It 'runs commands via ssh' {
144+
# $exitCode, $stdout, $stderr = Run-ThruSSH $global:CONTAINERNAME "$global:PRIVATE_SSH_KEY" "$global:CONTAINERSHELL -NoLogo -C `"Write-Host 'f00'`""
145+
# $exitCode | Should -Be 0
146+
# $stdout | Should -Match 'f00'
147+
# }
148+
149+
# AfterAll {
150+
# Cleanup($global:CONTAINERNAME)
151+
# }
152+
# }
153+
154+
# TODO: restore when https://github.com/jenkins-infra/helpdesk/issues/4557 infra issue is resolved
155+
# Describe "[$global:IMAGE_NAME] create agent container with pubkey as envvar" {
156+
# BeforeAll {
157+
# $exitCode, $stdout, $stderr = Run-Program 'docker' "run --detach --tty --name=`"$global:CONTAINERNAME`" --publish-all `"$global:IMAGE_NAME`" `"$global:PUBLIC_SSH_KEY`""
158+
# $exitCode | Should -Be 0
159+
# Is-ContainerRunning $global:CONTAINERNAME | Should -BeTrue
160+
# Start-Sleep -Seconds 10
161+
# }
162+
163+
# It 'runs commands via ssh' {
164+
# $exitCode, $stdout, $stderr = Run-ThruSSH $global:CONTAINERNAME "$global:PRIVATE_SSH_KEY" "$global:CONTAINERSHELL -NoLogo -C `"Write-Host 'f00'`""
165+
# $exitCode | Should -Be 0
166+
# $stdout | Should -Match 'f00'
167+
# Start-Sleep -Seconds 10
168+
# }
169+
170+
# AfterAll {
171+
# Cleanup($global:CONTAINERNAME)
172+
# }
173+
# }
174+
175+
176+
# TODO: restore when https://github.com/jenkins-infra/helpdesk/issues/4557 infra issue is resolved
177+
# $global:DOCKER_PLUGIN_DEFAULT_ARG="/usr/sbin/sshd -D -p 22"
178+
# Describe "[$global:IMAGE_NAME] create agent container like docker-plugin with '$global:DOCKER_PLUGIN_DEFAULT_ARG' as argument" {
179+
# BeforeAll {
180+
# [string]::IsNullOrWhiteSpace($global:DOCKER_PLUGIN_DEFAULT_ARG) | Should -BeFalse
181+
# $exitCode, $stdout, $stderr = Run-Program 'docker' "run --detach --tty --name=`"$global:CONTAINERNAME`" --publish-all --env=`"JENKINS_AGENT_SSH_PUBKEY=$global:PUBLIC_SSH_KEY`" `"$global:IMAGE_NAME`" `"$global:DOCKER_PLUGIN_DEFAULT_ARG`""
182+
# $exitCode | Should -Be 0
183+
# Is-ContainerRunning $global:CONTAINERNAME | Should -BeTrue
184+
# Start-Sleep -Seconds 10
185+
# }
186+
187+
# It 'runs commands via ssh' {
188+
# $exitCode, $stdout, $stderr = Run-ThruSSH $global:CONTAINERNAME "$global:PRIVATE_SSH_KEY" "$global:CONTAINERSHELL -NoLogo -C `"Write-Host 'f00'`""
189+
# $exitCode | Should -Be 0
190+
# $stdout | Should -Match 'f00'
191+
# }
192+
193+
# AfterAll {
194+
# Cleanup($global:CONTAINERNAME)
195+
# }
196+
# }
194197

195198
Describe "[$global:IMAGE_NAME] build args" {
196199
BeforeAll {

0 commit comments

Comments
 (0)