Browse code

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

Signed-off-by: Corbin <corbin.coleman@docker.com>

Corbin authored on 2017/10/05 05:43:00
Showing 1 changed files
... ...
@@ -34,7 +34,7 @@ func (s *DockerSuite) TestStatsNoStream(c *check.C) {
34 34
 	select {
35 35
 	case outerr := <-ch:
36 36
 		c.Assert(outerr.err, checker.IsNil, check.Commentf("Error running stats: %v", outerr.err))
37
-		c.Assert(string(outerr.out), checker.Contains, id) //running container wasn't present in output
37
+		c.Assert(string(outerr.out), checker.Contains, id[:12]) //running container wasn't present in output
38 38
 	case <-time.After(3 * time.Second):
39 39
 		statsCmd.Process.Kill()
40 40
 		c.Fatalf("stats did not return immediately when not streaming")