Merge pull request #19959 from WeiZhang555/fix-cli-print-err

Remove redundant error message
Upstream-commit: 28a7577a029780e4533faf3d057ec9f6c7a10948
Component: engine
This commit is contained in:
Alexander Morozov
2016-02-03 10:56:19 -08:00
17 changed files with 58 additions and 32 deletions

View File

@ -3,7 +3,6 @@ package main
import (
"io/ioutil"
"os"
"strings"
"github.com/docker/docker/pkg/integration/checker"
"github.com/go-check/check"
@ -77,11 +76,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) {