Allocate resources for server API before daemon creation
It prevents occupying of those resources (ports, unix-sockets) by containers. Also fixed false-positive test for that case. Fix #15912 Signed-off-by: Alexander Morozov <lk4d4@docker.com> Upstream-commit: 5eda566f937dddef9d4267dd8b8b1d8c3e47b290 Component: engine
This commit is contained in:
@ -1462,7 +1462,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithSocketAsVolume(c *check.C) {
|
||||
|
||||
socket := filepath.Join(s.d.folder, "docker.sock")
|
||||
|
||||
out, err := s.d.Cmd("run", "-d", "-v", socket+":/sock", "busybox")
|
||||
out, err := s.d.Cmd("run", "-d", "--restart=always", "-v", socket+":/sock", "busybox")
|
||||
c.Assert(err, check.IsNil, check.Commentf("Output: %s", out))
|
||||
c.Assert(s.d.Restart(), check.IsNil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user