summaryrefslogtreecommitdiff
path: root/vendor/github.com/testcontainers/testcontainers-go/testing.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/testing.go
parent16c27cd885b9c0d1241dfead3120643f0e8c556c (diff)
chore: use minit to start processes from Procfile
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: