Browse code

DockerExternalVolumeSuite: add daemon to test

Part of #23998. Adds a daemon to this test, so that the
volume that's created is added to this test daemon's vol store
instead of the main test daemons.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>

Christopher Jones authored on 2016/06/29 02:36:10
Showing 1 changed files
... ...
@@ -472,8 +472,12 @@ func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverWithDaemonRestart(c
472 472
 // Ensures that the daemon handles when the plugin responds to a `Get` request with a null volume and a null error.
473 473
 // Prior the daemon would panic in this scenario.
474 474
 func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverGetEmptyResponse(c *check.C) {
475
-	dockerCmd(c, "volume", "create", "-d", "test-external-volume-driver", "--name", "abc2", "--opt", "ninja=1")
476
-	out, _, err := dockerCmdWithError("volume", "inspect", "abc2")
475
+	c.Assert(s.d.Start(), checker.IsNil)
476
+
477
+	out, err := s.d.Cmd("volume", "create", "-d", "test-external-volume-driver", "--name", "abc2", "--opt", "ninja=1")
478
+	c.Assert(err, checker.IsNil, check.Commentf(out))
479
+
480
+	out, err = s.d.Cmd("volume", "inspect", "abc2")
477 481
 	c.Assert(err, checker.NotNil, check.Commentf(out))
478 482
 	c.Assert(out, checker.Contains, "No such volume")
479 483
 }