summaryrefslogtreecommitdiff
path: root/vendor/github.com/testcontainers/testcontainers-go/port_forwarding.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-08 13:11:59 -0600
committermo khan <mo@mokhan.ca>2025-07-21 15:20:39 -0600
commit2ddcc34ca455973598f5693d64103deea41d8d79 (patch)
tree0b3a42aa97bca93c15c67a679c903611e5ab60c1 /vendor/github.com/testcontainers/testcontainers-go/port_forwarding.go
parent16c27cd885b9c0d1241dfead3120643f0e8c556c (diff)
chore: use minit to start processes from Procfile
Diffstat (limited to 'vendor/github.com/testcontainers/testcontainers-go/port_forwarding.go')
-rw-r--r--vendor/github.com/testcontainers/testcontainers-go/port_forwarding.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/vendor/github.com/testcontainers/testcontainers-go/port_forwarding.go b/vendor/github.com/testcontainers/testcontainers-go/port_forwarding.go
index cd82361..107bd42 100644
--- a/vendor/github.com/testcontainers/testcontainers-go/port_forwarding.go
+++ b/vendor/github.com/testcontainers/testcontainers-go/port_forwarding.go
@@ -6,6 +6,7 @@ import (
"fmt"
"io"
"net"
+ "slices"
"sync"
"time"
@@ -19,7 +20,7 @@ import (
const (
// hubSshdImage {
- sshdImage string = "testcontainers/sshd:1.2.0"
+ sshdImage string = "testcontainers/sshd:1.3.0"
// }
// HostInternal is the internal hostname used to reach the host from the container,
@@ -135,13 +136,7 @@ func exposeHostPorts(ctx context.Context, req *ContainerRequest, ports ...int) (
modes := []container.NetworkMode{container.NetworkMode(sshdFirstNetwork), "none", "host"}
// if the container is not in one of the modes, attach it to the first network of the SSHD container
- found := false
- for _, mode := range modes {
- if hostConfig.NetworkMode == mode {
- found = true
- break
- }
- }
+ found := slices.Contains(modes, hostConfig.NetworkMode)
if !found {
req.Networks = append(req.Networks, sshdFirstNetwork)
}