1
0
mirror of https://github.com/moby/moby.git synced 2025-08-01 05:47:11 +03:00

validate log-opt when creating containers AGAIN

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
This commit is contained in:
Shijiang Wei
2016-03-02 20:22:18 +08:00
parent 187a2fb403
commit 068085005e
5 changed files with 25 additions and 23 deletions

View File

@ -443,8 +443,10 @@ func (s *DockerSuite) TestCreateWithWorkdir(c *check.C) {
func (s *DockerSuite) TestCreateWithInvalidLogOpts(c *check.C) {
name := "test-invalidate-log-opts"
_, _, err := dockerCmdWithError("create", "--name", name, "--log-opt", "invalid=true")
out, _, err := dockerCmdWithError("create", "--name", name, "--log-opt", "invalid=true", "busybox")
c.Assert(err, checker.NotNil)
out, _ := dockerCmd(c, "ps", "-a")
c.Assert(out, checker.Contains, "unknown log opt")
out, _ = dockerCmd(c, "ps", "-a")
c.Assert(out, checker.Not(checker.Contains), name)
}