expected new_container_id while testing ContainerCommit

Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
This commit is contained in:
lixiaobing10051267 2016-11-17 15:50:38 +08:00
parent 6e6b37b0a2
commit e98be4c62f
6 changed files with 9 additions and 9 deletions

View File

@ -91,6 +91,6 @@ func TestContainerCommit(t *testing.T) {
t.Fatal(err)
}
if r.ID != "new_container_id" {
t.Fatalf("expected `container_id`, got %s", r.ID)
t.Fatalf("expected `new_container_id`, got %s", r.ID)
}
}

View File

@ -195,7 +195,7 @@ func TestCopyFromContainer(t *testing.T) {
return nil, fmt.Errorf("Expected URL '%s', got '%s'", expectedURL, req.URL)
}
if req.Method != "GET" {
return nil, fmt.Errorf("expected PUT method, got %s", req.Method)
return nil, fmt.Errorf("expected GET method, got %s", req.Method)
}
query := req.URL.Query()
path := query.Get("path")

View File

@ -67,10 +67,10 @@ func TestContainerInspect(t *testing.T) {
t.Fatalf("expected `container_id`, got %s", r.ID)
}
if r.Image != "image" {
t.Fatalf("expected `image`, got %s", r.ID)
t.Fatalf("expected `image`, got %s", r.Image)
}
if r.Name != "name" {
t.Fatalf("expected `name`, got %s", r.ID)
t.Fatalf("expected `name`, got %s", r.Name)
}
}
@ -107,10 +107,10 @@ func TestContainerInspectNode(t *testing.T) {
t.Fatalf("expected `container_id`, got %s", r.ID)
}
if r.Image != "image" {
t.Fatalf("expected `image`, got %s", r.ID)
t.Fatalf("expected `image`, got %s", r.Image)
}
if r.Name != "name" {
t.Fatalf("expected `name`, got %s", r.ID)
t.Fatalf("expected `name`, got %s", r.Name)
}
if r.Node.ID != "container_node_id" {
t.Fatalf("expected `container_node_id`, got %s", r.Node.ID)

View File

@ -37,7 +37,7 @@ func TestImageImport(t *testing.T) {
}
repo := query.Get("repo")
if repo != "repository_name:imported" {
return nil, fmt.Errorf("repo not set in URL query properly. Expected 'repository_name', got %s", repo)
return nil, fmt.Errorf("repo not set in URL query properly. Expected 'repository_name:imported', got %s", repo)
}
tag := query.Get("tag")
if tag != "imported" {

View File

@ -31,7 +31,7 @@ func TestNetworkInspectContainerNotFound(t *testing.T) {
_, err := client.NetworkInspect(context.Background(), "unknown")
if err == nil || !IsErrNetworkNotFound(err) {
t.Fatalf("expected a containerNotFound error, got %v", err)
t.Fatalf("expected a networkNotFound error, got %v", err)
}
}

View File

@ -33,7 +33,7 @@ func TestPluginRemove(t *testing.T) {
return nil, fmt.Errorf("Expected URL '%s', got '%s'", expectedURL, req.URL)
}
if req.Method != "DELETE" {
return nil, fmt.Errorf("expected POST method, got %s", req.Method)
return nil, fmt.Errorf("expected DELETE method, got %s", req.Method)
}
return &http.Response{
StatusCode: http.StatusOK,