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:
@ -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
|
||||
|
Reference in New Issue
Block a user