Fix network settings inspect tests

Makes sure the containers are actually running when inspecting so the
ip info is actually populated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff 2015-11-03 12:12:19 -05:00
Родитель 49f55b273b
Коммит 3564895e84
1 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -154,10 +154,11 @@ func (s *DockerSuite) TestInspectApiEmptyFieldsInConfigPre121(c *check.C) {
}
func (s *DockerSuite) TestInspectApiBridgeNetworkSettings120(c *check.C) {
out, _ := dockerCmd(c, "run", "-d", "busybox", "true")
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
containerID := strings.TrimSpace(out)
waitRun(containerID)
cleanedContainerID := strings.TrimSpace(out)
body := getInspectBody(c, "v1.20", cleanedContainerID)
body := getInspectBody(c, "v1.20", containerID)
var inspectJSON v1p20.ContainerJSON
err := json.Unmarshal(body, &inspectJSON)
@ -168,10 +169,11 @@ func (s *DockerSuite) TestInspectApiBridgeNetworkSettings120(c *check.C) {
}
func (s *DockerSuite) TestInspectApiBridgeNetworkSettings121(c *check.C) {
out, _ := dockerCmd(c, "run", "-d", "busybox", "true")
cleanedContainerID := strings.TrimSpace(out)
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
containerID := strings.TrimSpace(out)
waitRun(containerID)
body := getInspectBody(c, "v1.21", cleanedContainerID)
body := getInspectBody(c, "v1.21", containerID)
var inspectJSON types.ContainerJSON
err := json.Unmarshal(body, &inspectJSON)