add error information to distinguish different test scene

Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 925c1427a8ed308ce55a0eed709c56515aeabcc4
Component: engine
This commit is contained in:
lixiaobing10051267
2016-11-04 17:16:11 +08:00
parent 1931090ba1
commit 062deefffb

View File

@ -19,7 +19,7 @@ func TestContainerCreateError(t *testing.T) {
}
_, err := client.ContainerCreate(context.Background(), nil, nil, nil, "nothing")
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
@ -28,7 +28,7 @@ func TestContainerCreateError(t *testing.T) {
}
_, err = client.ContainerCreate(context.Background(), nil, nil, nil, "nothing")
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)
}
}