From 8c10098ea51017fb514bef5c31a310a3f2d0d411 Mon Sep 17 00:00:00 2001 From: Corbin Date: Wed, 4 Oct 2017 13:43:00 -0700 Subject: [PATCH] Use the first 12 characters of the ID to match the output of docker stats command Signed-off-by: Corbin --- integration-cli/docker_cli_stats_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-cli/docker_cli_stats_test.go b/integration-cli/docker_cli_stats_test.go index 9d40ce028e..b83a8d4186 100644 --- a/integration-cli/docker_cli_stats_test.go +++ b/integration-cli/docker_cli_stats_test.go @@ -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")