mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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>
This commit is contained in:
parent
cccfe63e86
commit
88ea43d2aa
1 changed files with 6 additions and 2 deletions
|
@ -472,8 +472,12 @@ func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverWithDaemonRestart(c
|
||||||
// Ensures that the daemon handles when the plugin responds to a `Get` request with a null volume and a null error.
|
// Ensures that the daemon handles when the plugin responds to a `Get` request with a null volume and a null error.
|
||||||
// Prior the daemon would panic in this scenario.
|
// Prior the daemon would panic in this scenario.
|
||||||
func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverGetEmptyResponse(c *check.C) {
|
func (s *DockerExternalVolumeSuite) TestExternalVolumeDriverGetEmptyResponse(c *check.C) {
|
||||||
dockerCmd(c, "volume", "create", "-d", "test-external-volume-driver", "--name", "abc2", "--opt", "ninja=1")
|
c.Assert(s.d.Start(), checker.IsNil)
|
||||||
out, _, err := dockerCmdWithError("volume", "inspect", "abc2")
|
|
||||||
|
out, err := s.d.Cmd("volume", "create", "-d", "test-external-volume-driver", "--name", "abc2", "--opt", "ninja=1")
|
||||||
|
c.Assert(err, checker.IsNil, check.Commentf(out))
|
||||||
|
|
||||||
|
out, err = s.d.Cmd("volume", "inspect", "abc2")
|
||||||
c.Assert(err, checker.NotNil, check.Commentf(out))
|
c.Assert(err, checker.NotNil, check.Commentf(out))
|
||||||
c.Assert(out, checker.Contains, "No such volume")
|
c.Assert(out, checker.Contains, "No such volume")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue