1
0
mirror of https://github.com/moby/moby.git synced 2025-07-29 07:21:35 +03:00

Merge pull request #29762 from vdemeester/integration-mini-clean

Small cleanup in `integration-cli/docker_utils.go` 👼
This commit is contained in:
Sebastiaan van Stijn
2016-12-29 09:29:53 +01:00
committed by GitHub
4 changed files with 29 additions and 162 deletions

View File

@ -225,6 +225,16 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithIncreasedBasesize(c *check.C) {
s.d.Stop(c)
}
func convertBasesize(basesizeBytes int64) (int64, error) {
basesize := units.HumanSize(float64(basesizeBytes))
basesize = strings.Trim(basesize, " ")[:len(basesize)-3]
basesizeFloat, err := strconv.ParseFloat(strings.Trim(basesize, " "), 64)
if err != nil {
return 0, err
}
return int64(basesizeFloat) * 1024 * 1024 * 1024, nil
}
// Issue #8444: If docker0 bridge is modified (intentionally or unintentionally) and
// no longer has an IP associated, we should gracefully handle that case and associate
// an IP with it rather than fail daemon start