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:
parent
81f69a5931
commit
7dabed019a
17 changed files with 87 additions and 118 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue