Explorar o código

remove the check of ContentLength in TestApiStatsNoStreamGetCpu

Signed-off-by: yangshukui <yangshukui@huawei.com>
yangshukui %!s(int64=9) %!d(string=hai) anos
pai
achega
d474f7fb86
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      integration-cli/docker_api_stats_test.go

+ 1 - 1
integration-cli/docker_api_stats_test.go

@@ -27,7 +27,7 @@ func (s *DockerSuite) TestApiStatsNoStreamGetCpu(c *check.C) {
 
 
 	resp, body, err := sockRequestRaw("GET", fmt.Sprintf("/containers/%s/stats?stream=false", id), nil, "")
 	resp, body, err := sockRequestRaw("GET", fmt.Sprintf("/containers/%s/stats?stream=false", id), nil, "")
 	c.Assert(err, checker.IsNil)
 	c.Assert(err, checker.IsNil)
-	c.Assert(resp.ContentLength, checker.GreaterThan, int64(0), check.Commentf("should not use chunked encoding"))
+	c.Assert(resp.StatusCode, checker.Equals, http.StatusOK)
 	c.Assert(resp.Header.Get("Content-Type"), checker.Equals, "application/json")
 	c.Assert(resp.Header.Get("Content-Type"), checker.Equals, "application/json")
 
 
 	var v *types.Stats
 	var v *types.Stats