1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Remove assertions that were testing CLI behaviour.

These tests will be moved to docker/cli

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2017-08-31 18:19:17 -04:00
parent 184cea5ff7
commit 6590ee0dfb

View file

@ -69,6 +69,7 @@ func (s *DockerSuite) TestRenameCheckNames(c *check.C) {
}) })
} }
// TODO: move to unit test
func (s *DockerSuite) TestRenameInvalidName(c *check.C) { func (s *DockerSuite) TestRenameInvalidName(c *check.C) {
runSleepingContainer(c, "--name", "myname") runSleepingContainer(c, "--name", "myname")
@ -76,18 +77,6 @@ func (s *DockerSuite) TestRenameInvalidName(c *check.C) {
c.Assert(err, checker.NotNil, check.Commentf("Renaming container to invalid name should have failed: %s", out)) c.Assert(err, checker.NotNil, check.Commentf("Renaming container to invalid name should have failed: %s", out))
c.Assert(out, checker.Contains, "Invalid container name", check.Commentf("%v", err)) c.Assert(out, checker.Contains, "Invalid container name", check.Commentf("%v", err))
out, _, err = dockerCmdWithError("rename", "myname")
c.Assert(err, checker.NotNil, check.Commentf("Renaming container to invalid name should have failed: %s", out))
c.Assert(out, checker.Contains, "requires exactly 2 argument(s).", check.Commentf("%v", err))
out, _, err = dockerCmdWithError("rename", "myname", "")
c.Assert(err, checker.NotNil, check.Commentf("Renaming container to invalid name should have failed: %s", out))
c.Assert(out, checker.Contains, "may be empty", check.Commentf("%v", err))
out, _, err = dockerCmdWithError("rename", "", "newname")
c.Assert(err, checker.NotNil, check.Commentf("Renaming container with empty name should have failed: %s", out))
c.Assert(out, checker.Contains, "may be empty", check.Commentf("%v", err))
out, _ = dockerCmd(c, "ps", "-a") out, _ = dockerCmd(c, "ps", "-a")
c.Assert(out, checker.Contains, "myname", check.Commentf("Output of docker ps should have included 'myname': %s", out)) c.Assert(out, checker.Contains, "myname", check.Commentf("Output of docker ps should have included 'myname': %s", out))
} }