mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 15:28:35 +00:00
Fix my own comments from #7927
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user