mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #28540 from lixiaobing10051267/masterNewContainerId
expected new_container_id while testing ContainerCommit
This commit is contained in:
commit
c0acfd1dad
6 changed files with 9 additions and 9 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue