mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
integration-cli: docker_cli_links: fixed broken tests
The tests weren't ... tested when last edited, this patch fixes them so that they run and pass correctly. Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
This commit is contained in:
parent
ba6a732357
commit
924979259e
1 changed files with 4 additions and 4 deletions
|
@ -21,10 +21,10 @@ func TestPingLinkedContainers(t *testing.T) {
|
|||
var out string
|
||||
out, _, _ = cmd(t, "run", "-d", "--name", "container1", "busybox", "sleep", "10")
|
||||
idA := stripTrailingCharacters(out)
|
||||
out, _, _ = cmd("run", "-d", "--name", "container2", "busybox", "sleep", "10")
|
||||
out, _, _ = cmd(t, "run", "-d", "--name", "container2", "busybox", "sleep", "10")
|
||||
idB := stripTrailingCharacters(out)
|
||||
cmd("run", "--rm", "--link", "container1:alias1", "--link", "container2:alias2", "busybox", "sh", "-c", "ping -c 1 alias1 -W 1 && ping -c 1 alias2 -W 1")
|
||||
cmd("kill", idA)
|
||||
cmd("kill", idB)
|
||||
cmd(t, "run", "--rm", "--link", "container1:alias1", "--link", "container2:alias2", "busybox", "sh", "-c", "ping -c 1 alias1 -W 1 && ping -c 1 alias2 -W 1")
|
||||
cmd(t, "kill", idA)
|
||||
cmd(t, "kill", idB)
|
||||
deleteAllContainers()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue