1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fixes after dnephin review

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
This commit is contained in:
Christopher Crone 2017-09-14 19:17:49 +02:00
parent 81f69a5931
commit 7dabed019a
17 changed files with 87 additions and 118 deletions

View file

@ -25,20 +25,20 @@ import (
)
func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *check.C) {
// E2E: Test assumes no other containers running.
testRequires(c, cpuCfsQuota, NotE2E)
testRequires(c, cpuCfsQuota)
name := "testbuildresourceconstraints"
buildLabel := "DockerSuite.TestBuildResourceConstraintsAreUsed"
ctx := fakecontext.New(c, "", fakecontext.WithDockerfile(`
FROM hello-world:frozen
RUN ["/hello"]
`))
cli.Docker(
cli.Args("build", "--no-cache", "--rm=false", "--memory=64m", "--memory-swap=-1", "--cpuset-cpus=0", "--cpuset-mems=0", "--cpu-shares=100", "--cpu-quota=8000", "--ulimit", "nofile=42", "-t", name, "."),
cli.Args("build", "--no-cache", "--rm=false", "--memory=64m", "--memory-swap=-1", "--cpuset-cpus=0", "--cpuset-mems=0", "--cpu-shares=100", "--cpu-quota=8000", "--ulimit", "nofile=42", "--label="+buildLabel, "-t", name, "."),
cli.InDir(ctx.Dir),
).Assert(c, icmd.Success)
out := cli.DockerCmd(c, "ps", "-lq").Combined()
out := cli.DockerCmd(c, "ps", "-lq", "--filter", "label="+buildLabel).Combined()
cID := strings.TrimSpace(out)
type hostConfig struct {