integration/container: check some error-types in tests

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-08-13 23:08:10 +02:00
parent 2b583c0923
commit c0568a95d8
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -50,6 +50,7 @@ func TestRemoveContainerWithRemovedVolume(t *testing.T) {
assert.NilError(t, err)
_, _, err = apiClient.ContainerInspectWithRaw(ctx, cID, true)
assert.Check(t, is.ErrorType(err, errdefs.IsNotFound))
assert.Check(t, is.ErrorContains(err, "No such container"))
}
@ -112,5 +113,6 @@ func TestRemoveInvalidContainer(t *testing.T) {
apiClient := testEnv.APIClient()
err := apiClient.ContainerRemove(ctx, "unknown", types.ContainerRemoveOptions{})
assert.Check(t, is.ErrorType(err, errdefs.IsNotFound))
assert.Check(t, is.ErrorContains(err, "No such container"))
}