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

Use the first 12 characters of the ID to match the output of docker stats command

Signed-off-by: Corbin <corbin.coleman@docker.com>
This commit is contained in:
Corbin 2017-10-04 13:43:00 -07:00
parent d65ab869e8
commit 8c10098ea5

View file

@ -34,7 +34,7 @@ func (s *DockerSuite) TestStatsNoStream(c *check.C) {
select {
case outerr := <-ch:
c.Assert(outerr.err, checker.IsNil, check.Commentf("Error running stats: %v", outerr.err))
c.Assert(string(outerr.out), checker.Contains, id) //running container wasn't present in output
c.Assert(string(outerr.out), checker.Contains, id[:12]) //running container wasn't present in output
case <-time.After(3 * time.Second):
statsCmd.Process.Kill()
c.Fatalf("stats did not return immediately when not streaming")