Merge pull request #16986 from clnperez/test-inspect-warn-fix
Fix TestInspectInt64 for kernels without swap limit capability Upstream-commit: d0b4e7a0642b129f7b927c45b1e140372b28ac76 Component: engine
This commit is contained in:
@ -27,13 +27,9 @@ func (s *DockerSuite) TestInspectImage(c *check.C) {
|
||||
|
||||
func (s *DockerSuite) TestInspectInt64(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
out, _, err := dockerCmdWithError("run", "-d", "-m=300M", "busybox", "true")
|
||||
if err != nil {
|
||||
c.Fatalf("failed to run container: %v, output: %q", err, out)
|
||||
}
|
||||
out = strings.TrimSpace(out)
|
||||
|
||||
inspectOut, err := inspectField(out, "HostConfig.Memory")
|
||||
dockerCmd(c, "run", "-d", "-m=300M", "--name", "inspectTest", "busybox", "true")
|
||||
inspectOut, err := inspectField("inspectTest", "HostConfig.Memory")
|
||||
c.Assert(err, check.IsNil)
|
||||
|
||||
if inspectOut != "314572800" {
|
||||
|
||||
Reference in New Issue
Block a user