mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Use dockerCmd when possible (#14603)
- integration-cli/docker_cli_attach_test.go - integration-cli/docker_cli_attach_unix_test.go - integration-cli/docker_cli_build_test.go - integration-cli/docker_cli_build_unix_test.go - integration-cli/docker_cli_by_digest_test.go - integration-cli/docker_cli_commit_test.go - integration-cli/docker_cli_config_test.go - integration-cli/docker_cli_cp_test.go - integration-cli/docker_cli_create_test.go - integration-cli/docker_cli_pause_test.go - integration-cli/docker_cli_port_test.go - integration-cli/docker_cli_port_unix_test.go - integration-cli/docker_cli_proxy_test.go - integration-cli/docker_cli_ps_test.go - integration-cli/docker_cli_pull_test.go - integration-cli/docker_cli_push_test.go - docker_api_attach_test.go - docker_api_containers_test.go - docker_api_events_test.go - docker_api_exec_resize_test.go - docker_api_exec_test.go - docker_api_images_test.go - docker_api_info_test.go Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
4290bdefab
commit
5c295460da
23 changed files with 326 additions and 1054 deletions
|
@ -4,7 +4,6 @@ package main
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/go-check/check"
|
||||
|
@ -22,14 +21,9 @@ func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *check.C) {
|
|||
c.Fatal(err)
|
||||
}
|
||||
|
||||
cmd := exec.Command(dockerBinary, "build", "--no-cache", "--rm=false", "--memory=64m", "--memory-swap=-1", "--cpuset-cpus=0", "--cpuset-mems=0", "--cpu-shares=100", "--cpu-quota=8000", "-t", name, ".")
|
||||
cmd.Dir = ctx.Dir
|
||||
dockerCmdInDir(c, ctx.Dir, "build", "--no-cache", "--rm=false", "--memory=64m", "--memory-swap=-1", "--cpuset-cpus=0", "--cpuset-mems=0", "--cpu-shares=100", "--cpu-quota=8000", "-t", name, ".")
|
||||
|
||||
out, _, err := runCommandWithOutput(cmd)
|
||||
if err != nil {
|
||||
c.Fatal(err, out)
|
||||
}
|
||||
out, _ = dockerCmd(c, "ps", "-lq")
|
||||
out, _ := dockerCmd(c, "ps", "-lq")
|
||||
|
||||
cID := strings.TrimSpace(out)
|
||||
|
||||
|
@ -57,7 +51,7 @@ func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *check.C) {
|
|||
}
|
||||
|
||||
// Make sure constraints aren't saved to image
|
||||
_, _ = dockerCmd(c, "run", "--name=test", name)
|
||||
dockerCmd(c, "run", "--name=test", name)
|
||||
|
||||
cfg, err = inspectFieldJSON("test", "HostConfig")
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue