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

Add regression tests for client debug flag.

- Add client debug info to the `docker info` command.

Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
David Calavera
2016-02-01 18:09:25 -05:00
parent b6a6ed7200
commit 9f315dd328
5 changed files with 110 additions and 1 deletions

View File

@ -2095,3 +2095,24 @@ func (s *DockerDaemonSuite) TestDaemonStartWithoutColors(c *check.C) {
newD.Stop()
c.Assert(b.String(), check.Not(checker.Contains), infoLog)
}
func (s *DockerDaemonSuite) TestDaemonDebugLog(c *check.C) {
testRequires(c, DaemonIsLinux)
newD := NewDaemon(c)
debugLog := "\x1b[37mDEBU\x1b"
p, tty, err := pty.Open()
c.Assert(err, checker.IsNil)
defer func() {
tty.Close()
p.Close()
}()
b := bytes.NewBuffer(nil)
go io.Copy(b, p)
newD.StartWithLogFile(tty, "--debug")
newD.Stop()
c.Assert(b.String(), checker.Contains, debugLog)
}