Browse code

integration/container: check some error-types in tests

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2023/08/14 06:08:10
Showing 1 changed files
... ...
@@ -50,6 +50,7 @@ func TestRemoveContainerWithRemovedVolume(t *testing.T) {
50 50
 	assert.NilError(t, err)
51 51
 
52 52
 	_, _, err = apiClient.ContainerInspectWithRaw(ctx, cID, true)
53
+	assert.Check(t, is.ErrorType(err, errdefs.IsNotFound))
53 54
 	assert.Check(t, is.ErrorContains(err, "No such container"))
54 55
 }
55 56
 
... ...
@@ -112,5 +113,6 @@ func TestRemoveInvalidContainer(t *testing.T) {
112 112
 	apiClient := testEnv.APIClient()
113 113
 
114 114
 	err := apiClient.ContainerRemove(ctx, "unknown", types.ContainerRemoveOptions{})
115
+	assert.Check(t, is.ErrorType(err, errdefs.IsNotFound))
115 116
 	assert.Check(t, is.ErrorContains(err, "No such container"))
116 117
 }