Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
| ... | ... |
@@ -10,8 +10,8 @@ import ( |
| 10 | 10 |
"strings" |
| 11 | 11 |
"testing" |
| 12 | 12 |
|
| 13 |
+ cerrdefs "github.com/containerd/errdefs" |
|
| 13 | 14 |
"github.com/docker/docker/api/types/checkpoint" |
| 14 |
- "github.com/docker/docker/errdefs" |
|
| 15 | 15 |
"gotest.tools/v3/assert" |
| 16 | 16 |
is "gotest.tools/v3/assert/cmp" |
| 17 | 17 |
) |
| ... | ... |
@@ -25,14 +25,14 @@ func TestCheckpointCreateError(t *testing.T) {
|
| 25 | 25 |
Exit: true, |
| 26 | 26 |
}) |
| 27 | 27 |
|
| 28 |
- assert.Check(t, is.ErrorType(err, errdefs.IsSystem)) |
|
| 28 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal)) |
|
| 29 | 29 |
|
| 30 | 30 |
err = client.CheckpointCreate(context.Background(), "", checkpoint.CreateOptions{})
|
| 31 |
- assert.Check(t, is.ErrorType(err, errdefs.IsInvalidParameter)) |
|
| 31 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsInvalidArgument)) |
|
| 32 | 32 |
assert.Check(t, is.ErrorContains(err, "value is empty")) |
| 33 | 33 |
|
| 34 | 34 |
err = client.CheckpointCreate(context.Background(), " ", checkpoint.CreateOptions{})
|
| 35 |
- assert.Check(t, is.ErrorType(err, errdefs.IsInvalidParameter)) |
|
| 35 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsInvalidArgument)) |
|
| 36 | 36 |
assert.Check(t, is.ErrorContains(err, "value is empty")) |
| 37 | 37 |
} |
| 38 | 38 |
|
| ... | ... |
@@ -9,8 +9,8 @@ import ( |
| 9 | 9 |
"strings" |
| 10 | 10 |
"testing" |
| 11 | 11 |
|
| 12 |
+ cerrdefs "github.com/containerd/errdefs" |
|
| 12 | 13 |
"github.com/docker/docker/api/types/checkpoint" |
| 13 |
- "github.com/docker/docker/errdefs" |
|
| 14 | 14 |
"gotest.tools/v3/assert" |
| 15 | 15 |
is "gotest.tools/v3/assert/cmp" |
| 16 | 16 |
) |
| ... | ... |
@@ -24,14 +24,14 @@ func TestCheckpointDeleteError(t *testing.T) {
|
| 24 | 24 |
CheckpointID: "checkpoint_id", |
| 25 | 25 |
}) |
| 26 | 26 |
|
| 27 |
- assert.Check(t, is.ErrorType(err, errdefs.IsSystem)) |
|
| 27 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal)) |
|
| 28 | 28 |
|
| 29 | 29 |
err = client.CheckpointDelete(context.Background(), "", checkpoint.DeleteOptions{})
|
| 30 |
- assert.Check(t, is.ErrorType(err, errdefs.IsInvalidParameter)) |
|
| 30 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsInvalidArgument)) |
|
| 31 | 31 |
assert.Check(t, is.ErrorContains(err, "value is empty")) |
| 32 | 32 |
|
| 33 | 33 |
err = client.CheckpointDelete(context.Background(), " ", checkpoint.DeleteOptions{})
|
| 34 |
- assert.Check(t, is.ErrorType(err, errdefs.IsInvalidParameter)) |
|
| 34 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsInvalidArgument)) |
|
| 35 | 35 |
assert.Check(t, is.ErrorContains(err, "value is empty")) |
| 36 | 36 |
} |
| 37 | 37 |
|
| ... | ... |
@@ -10,8 +10,8 @@ import ( |
| 10 | 10 |
"strings" |
| 11 | 11 |
"testing" |
| 12 | 12 |
|
| 13 |
+ cerrdefs "github.com/containerd/errdefs" |
|
| 13 | 14 |
"github.com/docker/docker/api/types/checkpoint" |
| 14 |
- "github.com/docker/docker/errdefs" |
|
| 15 | 15 |
"gotest.tools/v3/assert" |
| 16 | 16 |
is "gotest.tools/v3/assert/cmp" |
| 17 | 17 |
) |
| ... | ... |
@@ -22,7 +22,7 @@ func TestCheckpointListError(t *testing.T) {
|
| 22 | 22 |
} |
| 23 | 23 |
|
| 24 | 24 |
_, err := client.CheckpointList(context.Background(), "container_id", checkpoint.ListOptions{})
|
| 25 |
- assert.Check(t, is.ErrorType(err, errdefs.IsSystem)) |
|
| 25 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal)) |
|
| 26 | 26 |
} |
| 27 | 27 |
|
| 28 | 28 |
func TestCheckpointList(t *testing.T) {
|
| ... | ... |
@@ -59,5 +59,5 @@ func TestCheckpointListContainerNotFound(t *testing.T) {
|
| 59 | 59 |
} |
| 60 | 60 |
|
| 61 | 61 |
_, err := client.CheckpointList(context.Background(), "unknown", checkpoint.ListOptions{})
|
| 62 |
- assert.Check(t, is.ErrorType(err, errdefs.IsNotFound)) |
|
| 62 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsNotFound)) |
|
| 63 | 63 |
} |