summaryrefslogtreecommitdiff
path: root/vendor/github.com/testcontainers/testcontainers-go/testing.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-21 16:15:51 -0600
committermo khan <mo@mokhan.ca>2025-07-21 16:15:51 -0600
commita920a8cfe415858bb2777371a77018599ffed23f (patch)
treedd7dcf8e78ea554d071ad502f92b7908687daa3e /vendor/github.com/testcontainers/testcontainers-go/testing.go
parent16c27cd885b9c0d1241dfead3120643f0e8c556c (diff)
parent5f76ebe3b95b491a7a07ddb9dd5799735cf3e159 (diff)
Merge branch 'minit' into 'main'
Replace entrypoint.sh with a Procfile runner See merge request gitlab-org/software-supply-chain-security/authorization/sparkled!18
Diffstat (limited to 'vendor/github.com/testcontainers/testcontainers-go/testing.go')
-rw-r--r--vendor/github.com/testcontainers/testcontainers-go/testing.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/vendor/github.com/testcontainers/testcontainers-go/testing.go b/vendor/github.com/testcontainers/testcontainers-go/testing.go
index 1f41913..704af99 100644
--- a/vendor/github.com/testcontainers/testcontainers-go/testing.go
+++ b/vendor/github.com/testcontainers/testcontainers-go/testing.go
@@ -7,7 +7,7 @@ import (
"regexp"
"testing"
- "github.com/docker/docker/errdefs"
+ "github.com/containerd/errdefs"
"github.com/stretchr/testify/require"
)
@@ -147,15 +147,19 @@ func isCleanupSafe(err error) bool {
return true
}
- switch x := err.(type) { //nolint:errorlint // We need to check for interfaces.
- case errdefs.ErrNotFound:
+ // First try with containerd's errdefs
+ switch {
+ case errdefs.IsNotFound(err):
return true
- case errdefs.ErrConflict:
+ case errdefs.IsConflict(err):
// Terminating a container that is already terminating.
if errAlreadyInProgress.MatchString(err.Error()) {
return true
}
return false
+ }
+
+ switch x := err.(type) { //nolint:errorlint // We need to check for interfaces.
case causer:
return isCleanupSafe(x.Cause())
case wrapErr: