diff options
author | Sebastiaan van Stijn <thaJeztah@users.noreply.github.com> | 2023-05-11 17:42:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-11 17:42:15 +0200 |
commit | 7c43e8c45a39ef0ee08c32d02ed2a5bca9697c8a (patch) | |
tree | bb9733588ff1244bdc26fc9b7d4214e8f6f5defe /client/container_update_test.go | |
parent | f0791afadeb095d911aa35c1fca8fbbbb2ace0a4 (diff) | |
parent | 8d76acfe6cfe6e468764f444cace81c81ed44fcb (diff) | |
download | docker-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/container_update_test.go')
-rw-r--r-- | client/container_update_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/container_update_test.go b/client/container_update_test.go index 83ae098be0..10dc1ed633 100644 --- a/client/container_update_test.go +++ b/client/container_update_test.go @@ -12,6 +12,8 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/errdefs" + "gotest.tools/v3/assert" + is "gotest.tools/v3/assert/cmp" ) func TestContainerUpdateError(t *testing.T) { @@ -19,9 +21,7 @@ func TestContainerUpdateError(t *testing.T) { client: newMockClient(errorMock(http.StatusInternalServerError, "Server error")), } _, err := client.ContainerUpdate(context.Background(), "nothing", container.UpdateConfig{}) - 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 TestContainerUpdate(t *testing.T) { |