summaryrefslogtreecommitdiff
path: root/integration/internal/container/states.go
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2023-05-10 13:19:53 +0200
committerSebastiaan van Stijn <github@gone.nl>2023-05-10 22:13:50 +0200
commit56fb56ccf030746bcdcf9803df0f848c156a4592 (patch)
tree58fc098701677a2f60ed6bcaf29aee08fa30996b /integration/internal/container/states.go
parent0538cdd226e0394aa604b8f36f4a3cd98c27e56f (diff)
downloaddocker-56fb56ccf030746bcdcf9803df0f848c156a4592.tar.gz
integration: update error-assertions in tests
- use is.ErrorType - replace uses of client.IsErrNotFound for errdefs.IsNotFound, as the client no longer returns the old error-type. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'integration/internal/container/states.go')
-rw-r--r--integration/internal/container/states.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/integration/internal/container/states.go b/integration/internal/container/states.go
index 0671b679e8..f2eb797ab7 100644
--- a/integration/internal/container/states.go
+++ b/integration/internal/container/states.go
@@ -5,6 +5,7 @@ import (
"strings"
"github.com/docker/docker/client"
+ "github.com/docker/docker/errdefs"
"github.com/pkg/errors"
"gotest.tools/v3/poll"
)
@@ -63,7 +64,7 @@ func IsRemoved(ctx context.Context, cli client.APIClient, containerID string) fu
return func(log poll.LogT) poll.Result {
inspect, err := cli.ContainerInspect(ctx, containerID)
if err != nil {
- if client.IsErrNotFound(err) {
+ if errdefs.IsNotFound(err) {
return poll.Success()
}
return poll.Error(err)