mirror of https://github.com/docker/cli.git
Merge pull request #28065 from lixiaobing10051267/masterServerEror
add error information to distinguish different test scene
This commit is contained in:
commit
c910d3825b
|
@ -19,7 +19,7 @@ func TestContainerCreateError(t *testing.T) {
|
||||||
}
|
}
|
||||||
_, err := client.ContainerCreate(context.Background(), nil, nil, nil, "nothing")
|
_, err := client.ContainerCreate(context.Background(), nil, nil, nil, "nothing")
|
||||||
if err == nil || err.Error() != "Error response from daemon: Server error" {
|
if err == nil || err.Error() != "Error response from daemon: Server error" {
|
||||||
t.Fatalf("expected a Server Error, got %v", err)
|
t.Fatalf("expected a Server Error while testing StatusInternalServerError, got %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 404 doesn't automagitally means an unknown image
|
// 404 doesn't automagitally means an unknown image
|
||||||
|
@ -28,7 +28,7 @@ func TestContainerCreateError(t *testing.T) {
|
||||||
}
|
}
|
||||||
_, err = client.ContainerCreate(context.Background(), nil, nil, nil, "nothing")
|
_, err = client.ContainerCreate(context.Background(), nil, nil, nil, "nothing")
|
||||||
if err == nil || err.Error() != "Error response from daemon: Server error" {
|
if err == nil || err.Error() != "Error response from daemon: Server error" {
|
||||||
t.Fatalf("expected a Server Error, got %v", err)
|
t.Fatalf("expected a Server Error while testing StatusNotFound, got %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue