Browse code

fix daemon tests that were using wrong containerd socket

Signed-off-by: Tibor Vass <tibor@docker.com>

Tibor Vass authored on 2018/09/26 02:57:35
Showing 2 changed files
... ...
@@ -44,7 +44,7 @@ import (
44 44
 	"gotest.tools/icmd"
45 45
 )
46 46
 
47
-const containerdSocket = "/run/containerd/containerd.sock" // "/var/run/docker/containerd/docker-containerd.sock"
47
+const containerdSocket = "/var/run/docker/containerd/containerd.sock"
48 48
 
49 49
 // TestLegacyDaemonCommand test starting docker daemon using "deprecated" docker daemon
50 50
 // command. Remove this test when we remove this.
... ...
@@ -2411,7 +2411,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromConfigFile(c *check.C) {
2411 2411
 {
2412 2412
     "runtimes": {
2413 2413
         "oci": {
2414
-            "path": "docker-runc"
2414
+            "path": "runc"
2415 2415
         },
2416 2416
         "vm": {
2417 2417
             "path": "/usr/local/bin/vm-manager",
... ...
@@ -2493,7 +2493,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromConfigFile(c *check.C) {
2493 2493
     "default-runtime": "vm",
2494 2494
     "runtimes": {
2495 2495
         "oci": {
2496
-            "path": "docker-runc"
2496
+            "path": "runc"
2497 2497
         },
2498 2498
         "vm": {
2499 2499
             "path": "/usr/local/bin/vm-manager",
... ...
@@ -2519,7 +2519,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromConfigFile(c *check.C) {
2519 2519
 }
2520 2520
 
2521 2521
 func (s *DockerDaemonSuite) TestRunWithRuntimeFromCommandLine(c *check.C) {
2522
-	s.d.StartWithBusybox(c, "--add-runtime", "oci=docker-runc", "--add-runtime", "vm=/usr/local/bin/vm-manager")
2522
+	s.d.StartWithBusybox(c, "--add-runtime", "oci=runc", "--add-runtime", "vm=/usr/local/bin/vm-manager")
2523 2523
 
2524 2524
 	// Run with default runtime
2525 2525
 	out, err := s.d.Cmd("run", "--rm", "busybox", "ls")
... ...
@@ -2566,7 +2566,7 @@ func (s *DockerDaemonSuite) TestRunWithRuntimeFromCommandLine(c *check.C) {
2566 2566
 
2567 2567
 	// Check that we can select a default runtime
2568 2568
 	s.d.Stop(c)
2569
-	s.d.StartWithBusybox(c, "--default-runtime=vm", "--add-runtime", "oci=docker-runc", "--add-runtime", "vm=/usr/local/bin/vm-manager")
2569
+	s.d.StartWithBusybox(c, "--default-runtime=vm", "--add-runtime", "oci=runc", "--add-runtime", "vm=/usr/local/bin/vm-manager")
2570 2570
 
2571 2571
 	out, err = s.d.Cmd("run", "--rm", "busybox", "ls")
2572 2572
 	c.Assert(err, check.NotNil, check.Commentf("%s", out))
... ...
@@ -38,6 +38,7 @@ type logT interface {
38 38
 }
39 39
 
40 40
 const defaultDockerdBinary = "dockerd"
41
+const containerdSocket = "/var/run/docker/containerd/containerd.sock"
41 42
 
42 43
 var errDaemonNotStarted = errors.New("daemon not started")
43 44
 
... ...
@@ -224,6 +225,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
224 224
 		return errors.Wrapf(err, "[%s] could not find docker binary in $PATH", d.id)
225 225
 	}
226 226
 	args := append(d.GlobalFlags,
227
+		"--containerd", containerdSocket,
227 228
 		"--data-root", d.Root,
228 229
 		"--exec-root", d.execRoot,
229 230
 		"--pidfile", fmt.Sprintf("%s/docker.pid", d.Folder),