Fix docker inspect container only reports last assigned information

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 1b9a08e719776e53b7aea1a89c2c29fbf27b1ae4
Component: engine
This commit is contained in:
Lei Jitang
2015-10-26 08:00:49 -04:00
committed by Tibor Vass
parent 17762bddf9
commit c2f87fdd0e
6 changed files with 95 additions and 52 deletions

View File

@ -284,7 +284,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectDisconnect(c *check.C) {
// check if container IP matches network inspect
ip, _, err := net.ParseCIDR(nr.Containers[containerID].IPv4Address)
c.Assert(err, check.IsNil)
containerIP := findContainerIP(c, "test")
containerIP := findContainerIP(c, "test", "test")
c.Assert(ip.String(), checker.Equals, containerIP)
// disconnect container from the network