Browse code

add error information to distinguish different test scene

Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>

lixiaobing10051267 authored on 2016/11/04 18:16:11
Showing 1 changed files
... ...
@@ -19,7 +19,7 @@ func TestContainerCreateError(t *testing.T) {
19 19
 	}
20 20
 	_, err := client.ContainerCreate(context.Background(), nil, nil, nil, "nothing")
21 21
 	if err == nil || err.Error() != "Error response from daemon: Server error" {
22
-		t.Fatalf("expected a Server Error, got %v", err)
22
+		t.Fatalf("expected a Server Error while testing StatusInternalServerError, got %v", err)
23 23
 	}
24 24
 
25 25
 	// 404 doesn't automagitally means an unknown image
... ...
@@ -28,7 +28,7 @@ func TestContainerCreateError(t *testing.T) {
28 28
 	}
29 29
 	_, err = client.ContainerCreate(context.Background(), nil, nil, nil, "nothing")
30 30
 	if err == nil || err.Error() != "Error response from daemon: Server error" {
31
-		t.Fatalf("expected a Server Error, got %v", err)
31
+		t.Fatalf("expected a Server Error while testing StatusNotFound, got %v", err)
32 32
 	}
33 33
 }
34 34