Remove deprecated cli flags

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 7929888214741c4ab194c44e0b14ac08aca06556
Component: engine
This commit is contained in:
Antonio Murdaca
2015-11-15 10:40:01 +01:00
parent c9ee279a92
commit 2e538bcbf1
21 changed files with 42 additions and 121 deletions
@@ -16,7 +16,7 @@ func (s *DockerSuite) TestInspectApiCpusetInConfigPre120(c *check.C) {
testRequires(c, cgroupCpuset)
name := "cpusetinconfig-pre120"
dockerCmd(c, "run", "--name", name, "--cpuset", "0-1", "busybox", "true")
dockerCmd(c, "run", "--name", name, "--cpuset-cpus", "0-1", "busybox", "true")
status, body, err := sockRequest("GET", fmt.Sprintf("/v1.19/containers/%s/json", name), nil)
c.Assert(status, check.Equals, http.StatusOK)
@@ -404,37 +404,6 @@ func (s *DockerDaemonSuite) TestDaemonLogLevelWrong(c *check.C) {
c.Assert(s.d.Start("--log-level=bogus"), check.NotNil, check.Commentf("Daemon shouldn't start with wrong log level"))
}
func (s *DockerSuite) TestDaemonStartWithBackwardCompatibility(c *check.C) {
var validCommandArgs = [][]string{
{"--selinux-enabled", "-l", "info"},
{"--insecure-registry", "daemon"},
}
var invalidCommandArgs = [][]string{
{"--selinux-enabled", "--storage-opt"},
{"-D", "-b"},
{"--config", "/tmp"},
}
for _, args := range validCommandArgs {
d := NewDaemon(c)
d.Command = "--daemon"
if err := d.Start(args...); err != nil {
c.Fatalf("Daemon should have started successfully with --daemon %v: %v", args, err)
}
d.Stop()
}
for _, args := range invalidCommandArgs {
d := NewDaemon(c)
if err := d.Start(args...); err == nil {
d.Stop()
c.Fatalf("Daemon should have failed to start with %v", args)
}
}
}
func (s *DockerSuite) TestDaemonStartWithDaemonCommand(c *check.C) {
type kind int
@@ -6,15 +6,14 @@ import (
"os"
"os/exec"
"path/filepath"
"sort"
"strconv"
"strings"
"time"
"github.com/docker/docker/pkg/integration/checker"
"github.com/go-check/check"
"sort"
"github.com/docker/docker/pkg/stringid"
"github.com/go-check/check"
)
func (s *DockerSuite) TestPsListContainersBase(c *check.C) {
@@ -163,15 +163,6 @@ func (s *DockerSuite) TestRunWithoutNetworking(c *check.C) {
if exitCode != 1 {
c.Errorf("--net=none should've disabled the network; the container shouldn't have been able to ping 8.8.8.8")
}
// And then with the short form -n
out, exitCode, err = dockerCmdWithError("run", "-n=false", image, "ping", count, "1", "8.8.8.8")
if err != nil && exitCode != 1 {
c.Fatal(out, err)
}
if exitCode != 1 {
c.Errorf("-n=false should've disabled the network; the container shouldn't have been able to ping 8.8.8.8")
}
}
//test --link use container name to link target
@@ -209,10 +200,9 @@ func (s *DockerSuite) TestRunLinksContainerWithContainerId(c *check.C) {
// Issue 9677.
func (s *DockerSuite) TestRunWithDaemonFlags(c *check.C) {
out, _, err := dockerCmdWithError("--exec-opt", "foo=bar", "run", "-i", "-t", "busybox", "true")
out, _, err := dockerCmdWithError("--exec-opt", "foo=bar", "run", "-i", "busybox", "true")
if err != nil {
if !strings.Contains(out, "must follow the 'docker daemon' command") && // daemon
!strings.Contains(out, "flag provided but not defined: --exec-opt") { // no daemon (client-only)
if !strings.Contains(out, "flag provided but not defined: --exec-opt") { // no daemon (client-only)
c.Fatal(err, out)
}
}
@@ -189,11 +189,6 @@ func (s *DockerSuite) TestRunEchoStdoutWithCPUSharesAndMemoryLimit(c *check.C) {
c.Assert(out, checker.Equals, "test\n", check.Commentf("container should've printed 'test'"))
}
func (s *DockerSuite) TestRunWithCpuset(c *check.C) {
testRequires(c, cgroupCpuset)
dockerCmd(c, "run", "--cpuset", "0", "busybox", "true")
}
func (s *DockerSuite) TestRunWithCpusetCpus(c *check.C) {
testRequires(c, cgroupCpuset)
dockerCmd(c, "run", "--cpuset-cpus", "0", "busybox", "true")