Don't error out when link name in use.

This preserves old behavior from sqlite links/names.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2016-01-20 16:24:16 -05:00
parent bdcc3ebe41
commit 332d95fd0d
2 changed files with 10 additions and 0 deletions

View File

@@ -212,3 +212,9 @@ func (s *DockerSuite) TestLinksEtcHostsRegularFile(c *check.C) {
// /etc/hosts should be a regular file
c.Assert(out, checker.Matches, "^-.+\n")
}
func (s *DockerSuite) TestLinksMultipleWithSameName(c *check.C) {
dockerCmd(c, "run", "-d", "--name=upstream-a", "busybox", "top")
dockerCmd(c, "run", "-d", "--name=upstream-b", "busybox", "top")
dockerCmd(c, "run", "--link", "upstream-a:upstream", "--link", "upstream-b:upstream", "busybox", "sh", "-c", "ping -c 1 upstream")
}