|
@@ -55,3 +55,14 @@ func TestCheckpointList(t *testing.T) {
|
|
|
t.Fatalf("expected 1 checkpoint, got %v", checkpoints)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+func TestCheckpointListContainerNotFound(t *testing.T) {
|
|
|
+ client := &Client{
|
|
|
+ client: newMockClient(errorMock(http.StatusNotFound, "Server error")),
|
|
|
+ }
|
|
|
+
|
|
|
+ _, err := client.CheckpointList(context.Background(), "unknown", types.CheckpointListOptions{})
|
|
|
+ if err == nil || !IsErrContainerNotFound(err) {
|
|
|
+ t.Fatalf("expected a containerNotFound error, got %v", err)
|
|
|
+ }
|
|
|
+}
|