mirror of
https://github.com/moby/moby.git
synced 2025-08-01 05:47:11 +03:00
Bump go-units
To include https://github.com/docker/go-units/pull/23 Fixes a unit test that fails because of it. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
@ -151,7 +151,7 @@ func (s *DockerSuite) TestPsListContainersSize(c *check.C) {
|
||||
baseLines := strings.Split(strings.Trim(baseOut, "\n "), "\n")
|
||||
baseSizeIndex := strings.Index(baseLines[0], "SIZE")
|
||||
baseFoundsize := baseLines[1][baseSizeIndex:]
|
||||
baseBytes, err := strconv.Atoi(strings.Split(baseFoundsize, " ")[0])
|
||||
baseBytes, err := strconv.Atoi(strings.Split(baseFoundsize, "B")[0])
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
name := "test_size"
|
||||
@ -177,7 +177,7 @@ func (s *DockerSuite) TestPsListContainersSize(c *check.C) {
|
||||
idIndex := strings.Index(lines[0], "CONTAINER ID")
|
||||
foundID := lines[1][idIndex : idIndex+12]
|
||||
c.Assert(foundID, checker.Equals, id[:12], check.Commentf("Expected id %s, got %s", id[:12], foundID))
|
||||
expectedSize := fmt.Sprintf("%d B", (2 + baseBytes))
|
||||
expectedSize := fmt.Sprintf("%dB", (2 + baseBytes))
|
||||
foundSize := lines[1][sizeIndex:]
|
||||
c.Assert(foundSize, checker.Contains, expectedSize, check.Commentf("Expected size %q, got %q", expectedSize, foundSize))
|
||||
}
|
||||
|
Reference in New Issue
Block a user