From e98be4c62f80ba0d240616ce1cdcd15ac3d30561 Mon Sep 17 00:00:00 2001 From: lixiaobing10051267 Date: Thu, 17 Nov 2016 15:50:38 +0800 Subject: [PATCH] expected new_container_id while testing ContainerCommit Signed-off-by: lixiaobing10051267 --- container_commit_test.go | 2 +- container_copy_test.go | 2 +- container_inspect_test.go | 8 ++++---- image_import_test.go | 2 +- network_inspect_test.go | 2 +- plugin_remove_test.go | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/container_commit_test.go b/container_commit_test.go index a844675368..6947ed3861 100644 --- a/container_commit_test.go +++ b/container_commit_test.go @@ -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) } } diff --git a/container_copy_test.go b/container_copy_test.go index 7eded611fd..6863cfba20 100644 --- a/container_copy_test.go +++ b/container_copy_test.go @@ -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") diff --git a/container_inspect_test.go b/container_inspect_test.go index f1a6f4ac7d..98f83bd8db 100644 --- a/container_inspect_test.go +++ b/container_inspect_test.go @@ -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) diff --git a/image_import_test.go b/image_import_test.go index e309be74e6..370ad5fbed 100644 --- a/image_import_test.go +++ b/image_import_test.go @@ -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" { diff --git a/network_inspect_test.go b/network_inspect_test.go index 1f926d66ba..55f04eca2c 100644 --- a/network_inspect_test.go +++ b/network_inspect_test.go @@ -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) } } diff --git a/plugin_remove_test.go b/plugin_remove_test.go index a15f1661f6..b2d515793a 100644 --- a/plugin_remove_test.go +++ b/plugin_remove_test.go @@ -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,