diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2023-05-10 13:17:40 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2023-05-10 22:13:38 +0200 |
commit | 66ff1e063eac6626658bafaa034a2ef9af9ad290 (patch) | |
tree | 5227ebde88a0dda06da4a2d5d1f66bd2612d274a /client/volume_remove_test.go | |
parent | 685b3d820a7f10d1d0b6e90a19f1ba0cf5c2caa2 (diff) | |
download | docker-66ff1e063eac6626658bafaa034a2ef9af9ad290.tar.gz |
client: 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 'client/volume_remove_test.go')
-rw-r--r-- | client/volume_remove_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/volume_remove_test.go b/client/volume_remove_test.go index 7581f72e8f..d3ee614b07 100644 --- a/client/volume_remove_test.go +++ b/client/volume_remove_test.go @@ -10,6 +10,8 @@ import ( "testing" "github.com/docker/docker/errdefs" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestVolumeRemoveError(t *testing.T) { @@ -18,9 +20,7 @@ func TestVolumeRemoveError(t *testing.T) { } err := client.VolumeRemove(context.Background(), "volume_id", false) - if !errdefs.IsSystem(err) { - t.Fatalf("expected a Server Error, got %[1]T: %[1]v", err) - } + assert.Check(t, is.ErrorType(err, errdefs.IsSystem)) } func TestVolumeRemove(t *testing.T) { |