Change the test back to what it was before
e83dad090a1e890ac870808d776fa584276bf7ab
And added an extra test-case to check the
output if an incorrect number of arguments
is passed.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -73,13 +73,17 @@ func (s *DockerSuite) TestRenameInvalidName(c *check.C) {
|
| 73 | 73 |
c.Assert(err, checker.NotNil, check.Commentf("Renaming container to invalid name should have failed: %s", out))
|
| 74 | 74 |
c.Assert(out, checker.Contains, "Invalid container name", check.Commentf("%v", err))
|
| 75 | 75 |
|
| 76 |
+ out, _, err = dockerCmdWithError("rename", "myname")
|
|
| 77 |
+ c.Assert(err, checker.NotNil, check.Commentf("Renaming container to invalid name should have failed: %s", out))
|
|
| 78 |
+ c.Assert(out, checker.Contains, "requires exactly 2 argument(s).", check.Commentf("%v", err))
|
|
| 79 |
+ |
|
| 76 | 80 |
out, _, err = dockerCmdWithError("rename", "myname", "")
|
| 77 | 81 |
c.Assert(err, checker.NotNil, check.Commentf("Renaming container to invalid name should have failed: %s", out))
|
| 78 |
- c.Assert(out, checker.Contains, "\"docker rename\" requires exactly 2 argument(s).", check.Commentf("%v", err))
|
|
| 82 |
+ c.Assert(out, checker.Contains, "may be empty", check.Commentf("%v", err))
|
|
| 79 | 83 |
|
| 80 | 84 |
out, _, err = dockerCmdWithError("rename", "", "newname")
|
| 81 | 85 |
c.Assert(err, checker.NotNil, check.Commentf("Renaming container with empty name should have failed: %s", out))
|
| 82 |
- c.Assert(out, checker.Contains, "\"docker rename\" requires exactly 2 argument(s).", check.Commentf("%v", err))
|
|
| 86 |
+ c.Assert(out, checker.Contains, "may be empty", check.Commentf("%v", err))
|
|
| 83 | 87 |
|
| 84 | 88 |
out, _ = dockerCmd(c, "ps", "-a") |
| 85 | 89 |
c.Assert(out, checker.Contains, "myname", check.Commentf("Output of docker ps should have included 'myname': %s", out))
|