summaryrefslogtreecommitdiff
path: root/client/volume_inspect_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/volume_inspect_test.go')
-rw-r--r--client/volume_inspect_test.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/client/volume_inspect_test.go b/client/volume_inspect_test.go
index be88f5f103..b98de3c5b8 100644
--- a/client/volume_inspect_test.go
+++ b/client/volume_inspect_test.go
@@ -23,9 +23,7 @@ func TestVolumeInspectError(t *testing.T) {
}
_, err := client.VolumeInspect(context.Background(), "nothing")
- 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 TestVolumeInspectNotFound(t *testing.T) {
@@ -34,7 +32,7 @@ func TestVolumeInspectNotFound(t *testing.T) {
}
_, err := client.VolumeInspect(context.Background(), "unknown")
- assert.Check(t, IsErrNotFound(err))
+ assert.Check(t, is.ErrorType(err, errdefs.IsNotFound))
}
func TestVolumeInspectWithEmptyID(t *testing.T) {
@@ -44,9 +42,7 @@ func TestVolumeInspectWithEmptyID(t *testing.T) {
}),
}
_, _, err := client.VolumeInspectWithRaw(context.Background(), "")
- if !IsErrNotFound(err) {
- t.Fatalf("Expected NotFoundError, got %v", err)
- }
+ assert.Check(t, is.ErrorType(err, errdefs.IsNotFound))
}
func TestVolumeInspect(t *testing.T) {