Skip to content

Commit 10e587d

Browse files
authored
Fix shim tests binding to 0 port (#1846)
1 parent bdacac8 commit 10e587d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

runner/internal/shim/docker_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ func (c *dockerParametersMock) DockerShellCommands(publicKeys []string) []string
154154

155155
func (c *dockerParametersMock) DockerPorts() []int {
156156
ports := make([]int, 0)
157-
ports = append(ports, c.sshPort)
157+
if c.sshPort != 0 {
158+
ports = append(ports, c.sshPort)
159+
}
158160
return ports
159161
}
160162

0 commit comments

Comments
 (0)