Fix Windows CI fail due to GH13866 and patch up tests
Signed-off-by: John Howard <jhoward@microsoft.com> Upstream-commit: c1b524486c80932f0c97b935f1ff9e41d30eab4e Component: engine
This commit is contained in:
@ -7,11 +7,9 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os/exec"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/docker/libcontainer/cgroups"
|
||||
"github.com/go-check/check"
|
||||
)
|
||||
|
||||
@ -121,24 +119,6 @@ var (
|
||||
},
|
||||
"Test requires support for IPv6",
|
||||
}
|
||||
OomControl = TestRequirement{
|
||||
func() bool {
|
||||
cgroupMemoryMountpoint, err := cgroups.FindCgroupMountpoint("memory")
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if _, err := ioutil.ReadFile(path.Join(cgroupMemoryMountpoint, "memory.memsw.limit_in_bytes")); err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if _, err = ioutil.ReadFile(path.Join(cgroupMemoryMountpoint, "memory.oom_control")); err != nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
||||
},
|
||||
"Test requires Oom control enabled.",
|
||||
}
|
||||
)
|
||||
|
||||
// testRequires checks if the environment satisfies the requirements
|
||||
|
||||
Reference in New Issue
Block a user