Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
| ... | ... |
@@ -11,8 +11,8 @@ import ( |
| 11 | 11 |
"strings" |
| 12 | 12 |
"testing" |
| 13 | 13 |
|
| 14 |
+ cerrdefs "github.com/containerd/errdefs" |
|
| 14 | 15 |
"github.com/docker/docker/api/types/swarm" |
| 15 |
- "github.com/docker/docker/errdefs" |
|
| 16 | 16 |
"gotest.tools/v3/assert" |
| 17 | 17 |
is "gotest.tools/v3/assert/cmp" |
| 18 | 18 |
) |
| ... | ... |
@@ -23,7 +23,7 @@ func TestTaskInspectError(t *testing.T) {
|
| 23 | 23 |
} |
| 24 | 24 |
|
| 25 | 25 |
_, _, err := client.TaskInspectWithRaw(context.Background(), "nothing") |
| 26 |
- assert.Check(t, is.ErrorType(err, errdefs.IsSystem)) |
|
| 26 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal)) |
|
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 | 29 |
func TestTaskInspectWithEmptyID(t *testing.T) {
|
| ... | ... |
@@ -33,11 +33,11 @@ func TestTaskInspectWithEmptyID(t *testing.T) {
|
| 33 | 33 |
}), |
| 34 | 34 |
} |
| 35 | 35 |
_, _, err := client.TaskInspectWithRaw(context.Background(), "") |
| 36 |
- assert.Check(t, is.ErrorType(err, errdefs.IsInvalidParameter)) |
|
| 36 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsInvalidArgument)) |
|
| 37 | 37 |
assert.Check(t, is.ErrorContains(err, "value is empty")) |
| 38 | 38 |
|
| 39 | 39 |
_, _, err = client.TaskInspectWithRaw(context.Background(), " ") |
| 40 |
- assert.Check(t, is.ErrorType(err, errdefs.IsInvalidParameter)) |
|
| 40 |
+ assert.Check(t, is.ErrorType(err, cerrdefs.IsInvalidArgument)) |
|
| 41 | 41 |
assert.Check(t, is.ErrorContains(err, "value is empty")) |
| 42 | 42 |
} |
| 43 | 43 |
|