Remove redundant error message
Currently some commands including `kill`, `pause`, `restart`, `rm`, `rmi`, `stop`, `unpause`, `udpate`, `wait` will print a lot of error message on client side, with a lot of redundant messages, this commit is trying to remove the unuseful and redundant information for user. Signed-off-by: Zhang Wei <zhangwei555@huawei.com> Upstream-commit: 894266c1bbdfeb53bf278f3cb762945bac69e592 Component: engine
This commit is contained in:
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/docker/pkg/integration/checker"
|
||||
"github.com/go-check/check"
|
||||
@@ -71,11 +70,9 @@ func (s *DockerSuite) TestRmContainerOrphaning(c *check.C) {
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestRmInvalidContainer(c *check.C) {
|
||||
if out, _, err := dockerCmdWithError("rm", "unknown"); err == nil {
|
||||
c.Fatal("Expected error on rm unknown container, got none")
|
||||
} else if !strings.Contains(out, "Failed to remove container") {
|
||||
c.Fatalf("Expected output to contain 'Failed to remove container', got %q", out)
|
||||
}
|
||||
out, _, err := dockerCmdWithError("rm", "unknown")
|
||||
c.Assert(err, checker.NotNil, check.Commentf("Expected error on rm unknown container, got none"))
|
||||
c.Assert(out, checker.Contains, "No such container")
|
||||
}
|
||||
|
||||
func createRunningContainer(c *check.C, name string) {
|
||||
|
||||
Reference in New Issue
Block a user