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:
John Howard
2015-07-08 13:30:03 -07:00
parent f9a4f23ebb
commit 448d2ef599
11 changed files with 365 additions and 339 deletions

View File

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