1
0
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:
Vincent Demeester
2017-02-07 21:58:56 +01:00
parent 09e99ef1fc
commit cb89d658dc
9 changed files with 45 additions and 45 deletions

View File

@ -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))
}