Fix my own comments from #7927

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
This commit is contained in:
Alexandr Morozov
2014-09-12 10:05:07 +04:00
parent 3b6a29b81a
commit 41e9e93e27
3 changed files with 31 additions and 36 deletions
+5 -3
View File
@@ -1887,10 +1887,12 @@ func TestRunPortInUse(t *testing.T) {
cmd := exec.Command(dockerBinary, "run", "-p", port+":80", "busybox", "true")
out, _, err := runCommandWithOutput(cmd)
if err == nil {
t.Fatalf("Host port %s already in use, has been allocated by docker: %q", port, out)
t.Fatalf("Binding on used port must fail")
}
if !strings.Contains(out, "address already in use") {
t.Fatalf("Out must be about \"address already in use\", got %s", out)
}
deleteAllContainers()
logDone("run - port in use")
logDone("run - fail if port already in use")
}