Integration test for link and unlink containers

Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
This commit is contained in:
Fabio Falci
2014-05-11 21:33:01 +01:00
parent 5877ae2462
commit 7cc27b2075
2 changed files with 36 additions and 0 deletions
+10
View File
@@ -61,3 +61,13 @@ func cmd(t *testing.T, args ...string) (string, int, error) {
errorOut(err, t, fmt.Sprintf("'%s' failed with errors: %v (%v)", strings.Join(args, " "), err, out))
return out, status, err
}
func findContainerIp(t *testing.T, id string) string {
cmd := exec.Command(dockerBinary, "inspect", "--format='{{ .NetworkSettings.IPAddress }}'", id)
out, _, err := runCommandWithOutput(cmd)
if err != nil {
t.Fatal(err, out)
}
return strings.Trim(out, " \r\n'")
}