diff options
| author | Sebastiaan van Stijn <github@gone.nl> | 2023-05-10 13:19:53 +0200 |
|---|---|---|
| committer | Sebastiaan van Stijn <github@gone.nl> | 2023-05-10 22:13:50 +0200 |
| commit | 56fb56ccf030746bcdcf9803df0f848c156a4592 (patch) | |
| tree | 58fc098701677a2f60ed6bcaf29aee08fa30996b /integration/internal/container/states.go | |
| parent | 0538cdd226e0394aa604b8f36f4a3cd98c27e56f (diff) | |
| download | docker-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.go | 3 |
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) |
