summaryrefslogtreecommitdiff
path: root/client/volume_list_test.go
diff options
context:
space:
mode:
authorSebastiaan van Stijn <thaJeztah@users.noreply.github.com>2023-05-11 17:42:15 +0200
committerGitHub <noreply@github.com>2023-05-11 17:42:15 +0200
commit7c43e8c45a39ef0ee08c32d02ed2a5bca9697c8a (patch)
treebb9733588ff1244bdc26fc9b7d4214e8f6f5defe /client/volume_list_test.go
parentf0791afadeb095d911aa35c1fca8fbbbb2ace0a4 (diff)
parent8d76acfe6cfe6e468764f444cace81c81ed44fcb (diff)
downloaddocker-7c43e8c45a39ef0ee08c32d02ed2a5bca9697c8a.tar.gz
Merge pull request #45513 from thaJeztah/client_remove_uses_of_IsErrNotFound
client: make IsErrNotFound an alias for errdefs.IsNotFound, clean-up assertions on tests
Diffstat (limited to 'client/volume_list_test.go')
-rw-r--r--client/volume_list_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/volume_list_test.go b/client/volume_list_test.go
index bf20434d54..d393f7d1de 100644
--- a/client/volume_list_test.go
+++ b/client/volume_list_test.go
@@ -13,6 +13,8 @@ import (
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/volume"
"github.com/docker/docker/errdefs"
+ "gotest.tools/v3/assert"
+ is "gotest.tools/v3/assert/cmp"
)
func TestVolumeListError(t *testing.T) {
@@ -21,9 +23,7 @@ func TestVolumeListError(t *testing.T) {
}
_, err := client.VolumeList(context.Background(), volume.ListOptions{})
- 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 TestVolumeList(t *testing.T) {