浏览代码

fix daemon tests that were using wrong containerd socket

Signed-off-by: Tibor Vass <tibor@docker.com>
Tibor Vass 6 年之前
父节点
当前提交
52b60f705c
共有 2 个文件被更改,包括 7 次插入5 次删除
  1. 5 5
      integration-cli/docker_cli_daemon_test.go
  2. 2 0
      internal/test/daemon/daemon.go

+ 5 - 5
integration-cli/docker_cli_daemon_test.go

@@ -44,7 +44,7 @@ import (
 	"gotest.tools/icmd"
 	"gotest.tools/icmd"
 )
 )
 
 
-const containerdSocket = "/run/containerd/containerd.sock" // "/var/run/docker/containerd/docker-containerd.sock"
+const containerdSocket = "/var/run/docker/containerd/containerd.sock"
 
 
 // TestLegacyDaemonCommand test starting docker daemon using "deprecated" docker daemon
 // TestLegacyDaemonCommand test starting docker daemon using "deprecated" docker daemon
 // command. Remove this test when we remove this.
 // command. Remove this test when we remove this.
@@ -2411,7 +2411,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromConfigFile(c *check.C) {
 {
 {
     "runtimes": {
     "runtimes": {
         "oci": {
         "oci": {
-            "path": "docker-runc"
+            "path": "runc"
         },
         },
         "vm": {
         "vm": {
             "path": "/usr/local/bin/vm-manager",
             "path": "/usr/local/bin/vm-manager",
@@ -2493,7 +2493,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromConfigFile(c *check.C) {
     "default-runtime": "vm",
     "default-runtime": "vm",
     "runtimes": {
     "runtimes": {
         "oci": {
         "oci": {
-            "path": "docker-runc"
+            "path": "runc"
         },
         },
         "vm": {
         "vm": {
             "path": "/usr/local/bin/vm-manager",
             "path": "/usr/local/bin/vm-manager",
@@ -2519,7 +2519,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromConfigFile(c *check.C) {
 }
 }
 
 
 func (s *DockerDaemonSuite) TestRunWithRuntimeFromCommandLine(c *check.C) {
 func (s *DockerDaemonSuite) TestRunWithRuntimeFromCommandLine(c *check.C) {
-	s.d.StartWithBusybox(c, "--add-runtime", "oci=docker-runc", "--add-runtime", "vm=/usr/local/bin/vm-manager")
+	s.d.StartWithBusybox(c, "--add-runtime", "oci=runc", "--add-runtime", "vm=/usr/local/bin/vm-manager")
 
 
 	// Run with default runtime
 	// Run with default runtime
 	out, err := s.d.Cmd("run", "--rm", "busybox", "ls")
 	out, err := s.d.Cmd("run", "--rm", "busybox", "ls")
@@ -2566,7 +2566,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromCommandLine(c *check.C) {
 
 
 	// Check that we can select a default runtime
 	// Check that we can select a default runtime
 	s.d.Stop(c)
 	s.d.Stop(c)
-	s.d.StartWithBusybox(c, "--default-runtime=vm", "--add-runtime", "oci=docker-runc", "--add-runtime", "vm=/usr/local/bin/vm-manager")
+	s.d.StartWithBusybox(c, "--default-runtime=vm", "--add-runtime", "oci=runc", "--add-runtime", "vm=/usr/local/bin/vm-manager")
 
 
 	out, err = s.d.Cmd("run", "--rm", "busybox", "ls")
 	out, err = s.d.Cmd("run", "--rm", "busybox", "ls")
 	c.Assert(err, check.NotNil, check.Commentf("%s", out))
 	c.Assert(err, check.NotNil, check.Commentf("%s", out))

+ 2 - 0
internal/test/daemon/daemon.go

@@ -38,6 +38,7 @@ type logT interface {
 }
 }
 
 
 const defaultDockerdBinary = "dockerd"
 const defaultDockerdBinary = "dockerd"
+const containerdSocket = "/var/run/docker/containerd/containerd.sock"
 
 
 var errDaemonNotStarted = errors.New("daemon not started")
 var errDaemonNotStarted = errors.New("daemon not started")
 
 
@@ -224,6 +225,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
 		return errors.Wrapf(err, "[%s] could not find docker binary in $PATH", d.id)
 		return errors.Wrapf(err, "[%s] could not find docker binary in $PATH", d.id)
 	}
 	}
 	args := append(d.GlobalFlags,
 	args := append(d.GlobalFlags,
+		"--containerd", containerdSocket,
 		"--data-root", d.Root,
 		"--data-root", d.Root,
 		"--exec-root", d.execRoot,
 		"--exec-root", d.execRoot,
 		"--pidfile", fmt.Sprintf("%s/docker.pid", d.Folder),
 		"--pidfile", fmt.Sprintf("%s/docker.pid", d.Folder),